soOptionLinger (Structure)

Top  Previous  Next

Architecture:

NX32L

Device support:

All

Firmware version:

1.00.00


The soOptionLinger structure contains the parameters for the _SO_OPTION_LINGER option in a socket.

The _SO_OPTION_LINGER option determine how a socket should behave when there are unsent data and the soClose function is called.

 

When this option is enabled, the socket will remain open for the number of seconds set, or until the data is sent.

When this option is not enabled the socket will be closed immediately and the unsent data will be lost.

 

The structure is used by the soConfigGet and and soConfigSet functions to get and set the _SO_OPTION_LINGER option in a socket.

 

 

Fields:

enable : BOOL

Enable (TRUE) or Disable (FALSE) the linger function.

 

linger : DINT

The number of seconds the socket should linger.

 

 

Declaration:

STRUCT_BLOCK soOptionLinger;
  enable   : BOOL;
  linger   : DINT;
END_STRUCT_BLOCK;