soStatus (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

1.08.00


The soStatus function will return information about the socket.

 

While this function can be used on a connectionless socket (type _SO_TYPE_DGRAM), the information returned is rarely useful.

(The status returned will always be 1 (not connected) and the remote address will only be valid if set by the soConnect function)

 

 

Input:

socket : SYSHANDLE

Handle to the socket.

 

 

Output:

local : STRING

The socket address of the local end of the connection.

 

remote : STRING

The socket address of the remote end of the connection.

 

 

Returns: INT

6

- The socket is connected and secured with TLS.

5

- The socket is connected.

4

- The socket is connecting.

3

- The socket is listening.

2

- The socket is closed.

1

- The socket is not connected.

0

- The function is not supported.

-1

- The handle is not a valid socket.

-2

- One or more parameters are illegal.

 

 

Declaration:

FUNCTION soStatus : INT;
VAR_INPUT
  socket  : SYSHANDLE;
  local   : ACCESS STRING;
  remote  : ACCESS STRING;
END_VAR;

 

 


Example:

 

Please see the "Examples - Telnet server2"