TipcSrvConnGetGmdNumPending


Name

TipcSrvConnGetGmdNumPending — get the number of outgoing GMD messages still pending on the connection

Synopsis

T_BOOL TipcSrvConnGetGmdNumPending(srv, gmd_num_pending_return) 
T_IPC_SRV srv; 
T_INT4 *gmd_num_pending_return; 

Arguments

srv — connection handle to RTserver

gmd_num_pending_return — storage for pending message count

Return Values

TRUE if the number of pending GMD messages was successfully retrieved from the connection handle to RTserver, FALSE otherwise.

Diagnostics

If TipcSrvConnGetGmdNumPending fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcSrvConnGetGmdNumPending gets the number of GMD messages published to RTserver that have not been acknowledged or explicitly deleted from the GMD area. Messages are deleted from the GMD area when a GMD_ACK message is received and when a GMD_FAILURE message is processed. TipcSrvConnGetGmdNumPending may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnGetGmdNumPending gets the number of pending GMD messages from the warm connection. See TipcSrvConnOpen for more information on creating connections and warm connections.

Caution

If TipcSrvConnGetGmdNumPending returns FALSE, it does not store a value in gmd_num_pending_return.

See Also

TipcConnGetGmdNumPending

Examples

This example loops processing messages until there are no more outgoing GMD messages pending on the connection to RTserver:

T_IPC_SRV srv; 
T_INT4 gmd_num_pending_return; 
do { 
  if (!TipcSrvConnMainLoop(srv, 1.0)) { 
    return;  /* error */ 
  } 
  if (!TipcSrvConnGetGmdNumPending(srv, &gmd_num_pending_return)) 
{ 
    return;  /* error */ 
  } 
} while (gmd_num_pending_return > 0); 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com