TipcSrvGetNode


Name

TipcSrvGetNode — get the node name of the connected RTserver

Synopsis

T_BOOL TipcSrvGetNode(node_return) 
T_STR *node_return; 

Arguments

node_return — storage for RTserver node name

Return Values

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

Diagnostics

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

Description

TipcSrvGetNode 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 TipcSrvGetNode and TipcMonServerGeneralPoll, but TipcSrvGetNode is easier to use if only the node name is needed instead of all RTserver general information.

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

Caution

If TipcSrvGetNode 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, TipcMonServerGeneralPoll, TipcSrvGetArch, TipcSrvGetPid, TipcSrvGetUniqueSubject, TipcSrvGetUser

Examples

This example prints the node name of the connected RTserver:

T_STR node; 
 
if (!TipcSrvGetNode(&node)) { 
  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