TipcSrvConnGmdFileDelete


Name

TipcSrvConnGmdFileDelete — delete guaranteed message delivery files for the connection

Synopsis

T_BOOL TipcSrvConnGmdFileDelete(srv) 
T_IPC_SRV srv; 

Arguments

srv — connection handle to RTserver

Return Values

TRUE if the connection GMD files were successfully deleted from disk, FALSE otherwise.

Diagnostics

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

Description

TipcSrvConnGmdFileDelete deletes from disk guaranteed message delivery (GMD) files for the connection to RTserver. Because TipcSrvConnOpen calls TipcSrvConnGmdResend (which opens any existing GMD files), TipcSrvConnGmdFileDelete does not call TipcConnGmdFileDelete but instead uses the same algorithm as TipcConnGmdFileDelete. TipcSrvConnGmdFileDelete is useful for processes that wish to completely delete any obsolete GMD information. See TipcConnGmdFileDelete for more information on deleting GMD files.

Caution

Old GMD files must be removed before a warm or full connection to RTserver is created. TipcSrvConnGmdFileDelete does not delete the GMD files if they are already open by this process and in use for the connection to RTserver.

See Also

TipcConnGmdFileDelete, TipcSrvConnGmdFileCreate

Examples

This example calls TipcSrvConnGmdFileDelete to remove any existing GMD files for the connection to RTserver, creates a connection to RTserver, and then sends a NUMERIC_DATA message with guaranteed delivery to the test subject using RTserver:

T_IPC_SRV srv; 
T_IPC_MT mt; 
T_IPC_MSG msg; 
 
/* have to set the Unique_Subject option to use file-based GMD */ 
TutCommandParseStr("setopt unique_subject /example/sender"); 
 
/* Clear out old GMD files before connecting to RTserver. No special action is needed if you wish to 
instead resend any previously sent messages with GMD (TipcSrvConnCreate automatically calls 
TipcSrvConnGmdResend). */ 
if (!TipcSrvConnGmdFileDelete(srv)) { 
  return;  /* error */ 
} 
 
if (!TipcSrvConnOpen(srv, T_IPC_SRV_CONN_FULL)) { 
  return;  /* error */ 
}  
 
mt = TipcMtLookupByNum(T_MT_NUMERIC_DATA); 
if (mt == NULL) { 
  return;  /* error */ 
}  
 
if (!TipcSrvConnMsgWrite(srv, "/system/test", mt, FALSE, 
                     T_IPC_PROP_DELIVERY_MODE, T_IPC_DELIVERY_ALL, 
                     T_IPC_FT_STR, "test_value", 
                     T_IPC_FT_REAL8, 10.0, 
                     NULL)) { 
  return;  /* error */ 
} 

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