SysSock2Select (FUN)
FUNCTION SysSock2Select : RTS_IEC_RESULT
- InOut:
Scope
Name
Type
Comment
Return
SysSock2SelectRTS_IEC_RESULT- Runtime system error code (see CmpErrors.library):
- ERR_OKERR_SOCK_TIMEDOUT, if timeout expired
Input
hSocketRTS_IEC_HANDLEHandle to one of the socket handles added to the FD Sets.
diWidthDINTNumber of sockets in the |SOCKET_FD_SET| structure, so |SOCKET_FD_SETSIZE| must be used here.
pfdReadPOINTER TO SOCKET_FD_SET
Optional pointer to the structure |SOCKET_FD_SET| defining the socket set to be checked for reading. It is also possible to set this parameter to 0.
pfdWritePOINTER TO SOCKET_FD_SET
Optional pointer to the structure |SOCKET_FD_SET| defining the socket set to be checked for writing. It is also possible to set this parameter to 0.
pfdExceptPOINTER TO SOCKET_FD_SET
Optional pointer to structure |SOCKET_FD_SET| that defines the socket set the error state has to be checked. It is also possible to set this parameter to 0.
ptvTimeoutPOINTER TO SOCKET_TIMEVAL
- Pointer to maximum timespan which the function SysSockSelect waits for a response:
- ptvTimeout=NULL: Infinite waitptvTimeout->tv_sec=-1, ptvTimeout->tv_usec=-1: Infinite waitptvTimeout->tv_sec=0, ptvTimeout->tv_usec=0: No wait
pdiReadyPOINTER TO DINT
Number of sockets that are ready for IO