The fx_sendfax( ), fx_rcvfax( ), fx_rcvfax2( ) and fx_loadfont( ) functions have a mode argument that specifies the mode of operation for the function -- synchronous or asynchronous. All other fax functions operate synchronously.
This section provides an overview of synchronous and asynchronous modes of operation.
2.7.1. Synchronous ModeSynchronous mode operation allows you to assign distinct applications to different channels in a system by simultaneously loading separate applications, each dedicated to a single channel.
In synchronous mode, a fax send or receive function returns control to the application only after the function has completed processing or an error has occurred. For example, a fax send function must transmit all the fax data (or return a processing error) before the application can issue another function call on the channel device.
For a full discussion of synchronous programming models, see the Voice Software Reference - Standard Runtime Library .
2.7.2. Asynchronous ModeAsynchronous mode operation enables a single program to control multiple channels. Multiple tasks can be coordinated via the same process, controlling, for example, the timing and sequence of each task in a single call session.
In asynchronous mode, a send or receive fax function returns control to the application immediately after successful invocation. The application can then issue other functions while the first asynchronous function continues processing (for example, sending or receiving fax data). This allows the application to open several channels and issue functions on each channel from a single process. The application then monitors events from the channels it is controlling and maintains a state machine for every channel. Based on the event received from a channel, the application issues the next appropriate function for that channel.
The Dialogic Standard Runtime Library generates events to indicate whether a function completed successfully or failed. See Section 8.3. Error Handling on page 128 for more information on errors and Appendix E on page 327 for a list of event codes.
For a full discussion of asynchronous programming models, see the Voice Software Reference - Standard Runtime Library.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation