FCT_LISTEN: Configuration of a Socket Await Connection
(Original Document)
Function Description
The FCT_LISTEN function sets up the specified socket to receive connections.
Connection requests are queued on the socket until they are accepted with the FCT_ACCEPT call. The length of the queue is set to 16. If a connection request arrives while the queue is full, the requesting client gets an ECONNREFUSED(16#3D) error.
The additional parameters EN and ENO may be configured.
Representation in FBD
Representation in LD
Representation in IL
LD Module_Number
FCT_LISTEN Socket_Number, Gest_Index, Management_Param
Representation in ST
FCT_LISTEN(Module_Number, Socket_Number, Gest_Index, Management_Param);
Description of Parameters
The following table describes the input parameters:
Parameter
Type
Comment
Module_Number
Slot number of network module in rack 0.
  • Low byte is the slot number of the network module in rack 0.
  • High byte can be used to extend the number of sockets.
    • 00: Provided for full backward compatibility with applications created on firmware version 3.3 or earlier.
    • 01: Up to 64 sockets can be used (firmware version must be higher than 3.3).
Socket_Number
Socket number
Gest_Index
Index of first word in Management_Param array
The following table describes the input/output parameters:
Parameter
Type
Comment
Management_Param
ARRAY [0... 3] OF INT
The operation report can have the following values:
  • 16#00: No error.
  • 16#09: The socket number is invalid.