TipcSrvGetSocket get the socket of the connection to RTserver
socket_return
storage for connection socket
TRUE
if socket was successfully retrieved from the connection to RTserver, FALSE
otherwise.
If TipcSrvGetSocket fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvGetSocket gets the socket file descriptor of the connection to RTserver by calling TipcConnGetSocket. A socket is an operating system device which provides a communication link to another process. All data sent to and received from the connection is transmitted on this socket.
TipcSrvGetSocket may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvGetSocket does not use the warm connection, because the warm connection does not have a valid socket. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.
If TipcSrvGetSocket returns FALSE
, it does not store a value in socket_return
.
TipcConnGetSocket, TipcSrvSetSocket, TipcSrvGetXtSource
This example creates a connection to RTserver and prints the socket of the connection:
T_INT4 socket; if (!TipcSrvCreate(T_IPC_SRV_CONN_FULL)) {return
; /* error */
} if (!TipcSrvGetSocket(&socket)) {return
; /* error */
} TutOut("Socket of connection to RTserver is <%d>.\n", socket);
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |