TipcSrvConnGetNode


Name

TipcSrvConnGetNode — get the node name of the connected RTserver

Synopsis

T_BOOL TipcSrvConnGetNode(srv, node_return) 
T_IPC_SRV srv; 
T_STR *node_return; 

Arguments

srv — connection handle to RTserver

node_return — storage for the RTserver node name

Return Values

TRUE if the node name was successfully retrieved from the connection to RTserver, FALSE otherwise.

Diagnostics

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

Description

TipcSrvConnGetNode gets the node name of the RTserver this RTclient is connected to by calling TipcConnGetNode. The RTserver node name can be useful for diagnostic purposes. There is some overlap between TipcSrvConnGetNode and TipcSrvMonServerGeneralPoll, but TipcSrvConnGetNode is easier to use if only the node name is needed instead of all RTserver general information.

TipcSrvConnGetNode may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvConnGetNode does not use the warm connection, because the warm connection does not have a peer process with a node name. See TipcSrvConnOpen for more information on creating connections and warm connections to RTserver.

Caution

If TipcSrvConnGetNode returns FALSE, it does not store a value in node_return.

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

See Also

TipcConnGetNode, TipcSrvMonServerGeneralPoll, TipcSrvConnGetArch, TipcSrvConnGetPid, TipcSrvConnGetUniqueSubject, TipcSrvConnGetUser

Examples

This example prints the node name of the connected RTserver:

T_IPC_SRV srv; 
T_STR node_return; 
 
if (!TipcSrvConnGetNode(srv, &node_return)) { 
  return;  /* error */ 
} 
TutOut("RTserver node name is <%s>.\n", node); 

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