TipcConnGetSocket


Name

TipcConnGetSocket — get the socket of a connection

Synopsis

T_BOOL TipcConnGetSocket(conn, socket_return) 
T_IPC_CONN conn; 
T_INT4 *socket_return; 

Arguments

conn — connection from which to get socket

socket_return — storage for connection socket

Return Values

TRUE if socket was successfully retrieved from connection, FALSE otherwise.

Diagnostics

If TipcConnGetSocket fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcConnGetSocket gets the socket file descriptor of a connection. 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.

Caution

If TipcConnGetSocket returns FALSE, it does not store a value in socket_return.

See Also

TipcConnGetXtSource, TipcConnSetSocket

Examples

This example prints the socket of a connection:

T_INT4 socket; 
 
if (!TipcConnGetSocket(conn, &socket)) { 
  return;  /* error */ 
}  
 
TutOut("Connection socket 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