SysSock2RecvFrom (FUN)ΒΆ
FUNCTION SysSock2RecvFrom : __XINT
NOTE: With some IP stacks (LwIP for example, which is used with the CODESYS Control RTE), it is necessary to set the SOCKET_SO_BROADCAST socket option (SOCKET_SOL level) in order to be able to receive broadcast UDP messages with the SysSock2RecvMsg() and SysSock2RecvFrom() functions.
- InOut:
- Scope - Name - Type - Comment - Return - SysSock2RecvFrom- __XINT- Number of bytes received - Input - hSocket- RTS_IEC_HANDLE- Handle to the socket - pbyBuffer- POINTER TO BYTE - Buffer to read data from the socket - diBufferSize- __XINT- Maximum length of the buffer - diFlags- DINTThe flags parameter can be used to influence the behavior of the function beyond the options specified for the associated socket. The semantics of this function are determined by the socket options and the flags parameter. The latter is constructed by using the bitwise OR operator with any of the SOCKET_MSG values.- pSockAddr- POINTER TO SOCKADDRESS - Socket address and port to receive data from - diSockAddrSize- DINT- Size of socket address structure - pResult- POINTER TO RTS_IEC_RESULT - Pointer to runtime system error code (see CmpErrors.library) 
