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