Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awDispatch | awDispatch
 
awDispatch
BrokerError awDispatch(int msecs);
msecs
The number of milliseconds to wait for an event to process before timing out. If set to AW_INFINITE, this function will wait indefinitely.
Waits for an incoming event that needs to be passed to a callback function. This function will return after an event is received and passed to a callback function or after the wait time, specified by msecs, has expired. If the wait time expires, this function returns an error with error code AW_ERROR_TIMEOUT.
When using awDispatch, you cannot invoke any of the following functions:
* awMainLoop
* awThreadedCallbacks
Possible BrokerError major codes
Meaning
AW_ERROR_BAD_STATE
This function was called from a callback function.
AW_ERROR_INTERRUPTED
The awInterruptDispatch function was invoked.
AW_ERROR_INVALID_CLIENT
The client has been destroyed or disconnected.
AW_ERROR_OUT_OF_RANGE
The msecs parameter is less than -1.
AW_ERROR_TIMEOUT
The msecs time-out interval expired before an event arrived.
See also: