TipcSrvGmdFileDelete


Name

TipcSrvGmdFileDelete — delete guaranteed message delivery files for the connection to RTserver

Synopsis

T_BOOL TipcSrvGmdFileDelete() 

Arguments

None

Return Values

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

Diagnostics

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

Description

TipcSrvGmdFileDelete deletes from disk guaranteed message delivery (GMD) files for the connection to RTserver. Because TipcSrvCreate calls TipcSrvGmdResend (which opens any existing GMD files), TipcSrvGmdFileDelete does not call TipcConnGmdFileDelete but instead uses the same algorithm as TipcConnGmdFileDelete. TipcSrvGmdFileDelete 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. TipcSrvGmdFileDelete 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, TipcSrvGmdFileCreate

Examples

This example calls TipcSrvGmdFileDelete 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_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 (TipcSrvCreate automatically calls 
TipcSrvGmdResend). */ 
if (!TipcSrvGmdFileDelete()) { 
  return;  /* error */ 
} 
 
if (!TipcSrvCreate(T_IPC_SRV_CONN_FULL)) { 
  return;  /* error */ 
}  
 
mt = TipcMtLookupByNum(T_MT_NUMERIC_DATA); 
if (mt == NULL) { 
  return;  /* error */ 
}  
 
if (!TipcSrvMsgWrite("/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