TipcSrvGetUniqueSubject


Name

TipcSrvGetUniqueSubject — get the unique subject of the connected RTserver

Synopsis

T_BOOL TipcSrvGetUniqueSubject(unique_subject_return) 
T_STR *unique_subject_return; 

Arguments

unique_subject_return — storage for RTserver unique subject

Return Values

TRUE if the unique subject was successfully retrieved from the connection to RTserver, FALSE otherwise.

Diagnostics

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

Description

TipcSrvGetUniqueSubject gets the unique subject of the RTserver this RTclient is connected to by calling TipcConnGetUniqueSubject. The RTserver unique subject can be useful for diagnostic purposes. The unique subject, which is used to uniquely identify a process, is stored in the option Unique_Subject. There is some overlap between TipcSrvGetUniqueSubject and TipcMonServerGeneralPoll, but TipcSrvGetUniqueSubject is easier to use if only the unique subject is needed instead of all RTserver general information.

TipcSrvGetUniqueSubject may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvGetUniqueSubject does not use the warm connection, because the warm connection does not have a peer process with a unique subject. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.

Caution

If TipcSrvGetUniqueSubject returns FALSE, it does not store a value in unique_subject_return.

The value stored in unique_subject_return points directly into an internal data structure and should not be modified.

See Also

TipcConnGetUniqueSubject, TipcMonServerGeneralPoll, TipcSrvGetArch, TipcSrvGetNode, TipcSrvGetPid, TipcSrvGetUser

Examples

This example prints the unique subject of the connected RTserver:

T_STR unique_subject; 
 
if (!TipcSrvGetUniqueSubject(&unique_subject)) { 
  return;  /* error */ 
} 
 
TutOut("RTserver unique subject is <%s>.\n",  
       unique_subject); 

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