TipcSrvGetUser get the user name of the connected RTserver
user_return
storage for RTserver user name
TRUE
if the user name was successfully retrieved from the connection to RTserver, FALSE
otherwise.
If TipcSrvGetUser fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvGetUser gets the user name of the RTserver this RTclient is connected to by calling TipcConnGetUser. The RTserver username can be useful for diagnostic purposes. There is some overlap between TipcSrvGetUser and TipcMonServerGeneralPoll, but TipcSrvGetUser is easier to use if only the user name is needed instead of all RTserver general information.
TipcSrvGetUser may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvGetUser does not use the warm connection, because the warm connection does not have a peer process with a user name. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.
If TipcSrvGetUser returns FALSE
, it does not store a value in user_return
.
The value stored in user_return
points directly into an internal data structure and should not be modified.
TipcConnGetUser, TipcMonServerGeneralPoll, TipcSrvGetArch, TipcSrvGetNode, TipcSrvGetPid, TipcSrvGetUniqueSubject
This example prints the user name of the connected RTserver:
T_STR user; if (!TipcSrvGetUser(&user)) {
return
; /* error */
} TutOut("RTserver user name is <%s>.\n", user);
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |