TipcSrvGetPid


Name

TipcSrvGetPid — get the process ID of the connected RTserver

Synopsis

T_BOOL TipcSrvGetPid(pid_return) 
T_INT4 *pid_return; 

Arguments

pid_return — storage for RTserver ID

Return Values

TRUE if the process ID was successfully retrieved from the connection to RTserver, FALSE otherwise.

Diagnostics

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

Description

TipcSrvGetPid gets the operating system process ID of the RTserver this RTclient is connected to by calling TipcConnGetPid. The RTserver ID can be useful for diagnostic purposes. There is some overlap between TipcSrvGetPid and TipcMonServerGeneralPoll, but TipcSrvGetPid is easier to use if only the process ID is needed instead of all RTserver general information.

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

Caution

If TipcSrvGetPid returns FALSE, it does not store a value in pid_return.

See Also

TipcConnGetPid, TipcMonServerGeneralPoll, TipcSrvGetArch, TipcSrvGetNode, TipcSrvGetUniqueSubject, TipcSrvGetUser

Examples

This example prints the process ID of the connected RTserver:

T_INT4 pid; 
if (!TipcSrvGetPid(&pid)) { 
  return;  /* error */ 
} 
 
TutOut("RTserver ID is <%d>.\n", pid); 

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