TipcSrvMainLoop read and process messages on the connection to RTserver
timeout
maximum number of seconds to wait for message to arrive
TRUE
if all pending messages were successfully processed on the connection to RTserver, FALSE
otherwise.
If TipcSrvMainLoop fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvMainLoop reads and processes messages on the connection to RTserver by calling TipcConnMainLoop. TipcSrvMainLoop is a convenience function that can be used in many situations instead of TipcSrvMsgNext, TipcSrvMsgProcess, and TipcMsgDestroy. See TipcConnMainLoop for more information on reading and processing messages.
If an error occurs, TipcSrvMainLoop by default restarts RTserver and return FALSE
. To use TipcSrvMainLoop with a timeout of T_TIMEOUT_FOREVER,
wrap an extra forever loop, either for (;;
) or while (1
), around the call to TipcSrvMainLoop.
TipcSrvMainLoop may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvMainLoop processes messages on the warm connection. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.
None
TipcConnMainLoop, TipcMsgDestroy, TipcSrvMsgNext, TipcSrvMsgProcess
This example creates a connection to RTserver, then reads and processes messages forever with TipcSrvMainLoop (note the use of TipcSrvMainLoop in a loop):
if (!TipcSrvCreate(T_IPC_SRV_CONN_FULL)) {return
; /* error */
} for (;;) { if (!TipcSrvMainLoop(T_TIMEOUT_FOREVER)) {return
; /* error */
} }
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |