SysSockSelectΒΆ

This function of type DINT calls the function select of the operating system to check whether one or several sockets are ready for certain communication actions. The group of sockets, to which this request should be applied, can be defined via the structure SOCKET_FD_SET.

The function will return the result of the select function.

Variable Data type Description
diWidth DINT Size of structure SOCKET_FD_SET.
fdRead DWORD

Optionally a pointer to the structure defining the socket set for which the status of the read actions should be checked. You also can pass 0. Structure SOCKET_FD_SET see below

(corresponding parameter e.g. in Win32: readfds)

fdWrite DWORD

Optionally a pointer to the structure, defining the socket for which the status of the write actions should be checked. You also can pass 0. Structure SOCKET_FD_SET see below

(corresponding parameter e.g. in Win32: writefds)

fdExcept DWORD

Optionally a pointer to the structure, defining the socket for which the error status should be checked. You also can pass 0. Structure SOCKET_FD_SET see below

(corresponding parameter e.g. in Win32: exceptfds)

ptvTimeout DWORD

Maximum time which the SysSockSelect function will wait for an answer; Structure SOCKET_TIMEVAL, see below

(corresponding parameter e.g. in Win32:timeout)

Structure SOCKET_FD_SET

fd_count: UDINT; (* Number of sockets *)
fd_array: ARRAY [0..63] OF DINT; (* Field with socket descriptors *)

Structure SOCKET_TIMEVAL:

tv_sec: DINT; (* seconds *)
tv_usec: DINT; (* microseconds *)