SOCKET.INFO()

SOCKET.INFO()

Top  Previous  Next

 

The SOCKET.INFO() function returns information about an open socket.

 

 

Format

 

SOCKET.INFO(skt, key)

 

where

 

sktis the socket variable for an open socket.

 

keyidentifies the information to be returned:
SKT$INFO.OPENIs skt a socket variable? Returns True or False.
SKT$INFO.TYPEType or socket. Returns one of the following values according to which socket function was used to open the socket:
SKT$INFO.TYPE.SERVERCREATE.SERVER.SOCKET()
SKT$INFO.TYPE.INCOMINGACCEPT.SOCKET.CONNECTION()
SKT$INFO.TYPE.OUTGOINGOPEN.SOCKET()
SKT$INFO.PORTPort number.
SKT$INFO.IP.ADDRPeer IP address. When used with a server socket, this will be a null string if the addr argument to the CREATE.SERVER.SOCKET() was null.
SKT$INFO.BLOCKINGDefault blocking mode.
SKT$INFO.NO.DELAYNagle algorithm disabled?
SKT$INFO.KEEP.ALIVESend keep alives?
SKT$INFO.EVENTSReport events related to use of SELECT.SOCKET().
SKT$INFO.PEER.PORTPort number at other end of connection.
SKT$INFO.NAMEPathname for Unix local socket.
SKT$INFO.LOCAL.NAMELocal IP address on established TCP connection.

 

 

The SOCKET.INFO() function returns information about an open socket as shown in the parameter descriptions above.

 

The value returned by SKT$INFO.EVENTS is an additive value formed from:

1

SKT$READ_EVENT

A new connection is on a server socket

Data is available to be read with READ.SOCKET()

The connection has been closed

2

SKT$WRITE_EVENT

Data can be sent with WRITE.SOCKET()

4

SKT$EXCEPTION_EVENT

An exception has occurred

 

 

See also:

Using Socket Connections, ACCEPT.SOCKET.CONNECTION, CLOSE.SOCKET, CREATE.SERVER.SOCKET(), OPEN.SOCKET(), READ.SOCKET(), SELECT.SOCKET(), SERVER.ADDR(), SET.SOCKET.MODE(), WRITE.SOCKET()