|
The SOCKET.INFO() function returns information about an open socket.
Format
SOCKET.INFO(skt, key)
where
| skt | is the socket variable for an open socket. |
| key | identifies the information to be returned: |
| SKT$INFO.OPEN | Is skt a socket variable? Returns true (1) or false (0). |
| SKT$INFO.TYPE | Type or socket. Returns one of the following values according to which socket function was used to open the socket: |
| SKT$INFO.PORT | Port number. |
| SKT$INFO.IP.ADDR | IP address. |
| SKT$INFO.BLOCKING | Default blocking mode. |
| SKT$INFO.NO.DELAY | Nagle algorithm disabled? |
| SKT$INFO.KEEP.ALIVE | Send keep alives? |
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()
|