TipcSrvGetNumQueued get number of queued messages from the connection to RTserver
num_queued_return
storage for number of queued messages
TRUE
if number of queued messages was successfully retrieved from the connection to RTserver, FALSE
otherwise.
If TipcSrvGetNumQueued fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvGetNumQueued gets the number of queued messages from the connection to RTserver by calling TipcConnGetNumQueued. A connection has a priority queue of incoming messages. See TipcConnGetNumQueued for more information on connection message queues.
TipcSrvGetNumQueued may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvGetNumQueued gets the number of queued messages from the warm connection. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.
If TipcSrvGetNumQueued returns FALSE
, it does not store a value in num_queued_return
.
TipcConnGetNumQueued, TipcSrvMsgNext, TipcSrvMainLoop, TipcSrvRead
This example prints the number of queued messages, then reads from the connection to RTserver until at least three messages are available:
T_INT4 num_queued; if (!TipcSrvGetNumQueued(&num_queued)) {return
; /* error */
} TutOut("The connection to RTserver has %d queued messages.\n", num_queued); while (num_queued < 3) { if (!TipcSrvRead(T_TIMEOUT_FOREVER)) {return
; /* error */
} if (!TipcSrvGetNumQueued(&num_queued)) {return
; /* error */
} }
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |