sockDisconnect (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


Disconnects a socket and the connection established. All references to the connection identification (ID) after this call are illegal.

 

Please note that for each sockConnect(), there must be a sockDisconnect(), even if the connection is closed from the "outside" (see example below).

 

Input:                

id : SINT

ID of the connection.

 

Returns: INT

0

- Success.

1

- Illegal ID.

 

Declaration:

FUNCTION sockDisconnect : INT;
VAR_INPUT
  id : SINT; // ID of the connection.
END_VAR;

 

 


Example:

 

Please see the "Examples - Socket Communication"