SysSockRecvFrom

This UDP specific function of type DINT calls the function recvfrom of the operating system, in order to read the data which have been sent to the socket.

The function will return the number of read bits. If the socket has been “gracefully closed” , 0 will be returned, otherwise 1.

Variable Data type Description
diSocket DINT

Descriptor of the socket, returned by SysSockCreate

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

pbyBuffer DWORD

Address of the buffer from which the data should be received

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

diBufferSize DINT

Size of the buffer from which the data should be received

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

diFlags DINT

Defines in which way the function should be called; depending on the socket options.

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

pSockAddr DWORD Pointer to a variable of type SOCKADDR; (see SysSockAccept)
diSockAddrSize DINT

Length of structure SockAddr (can be retrieved via the SIZEOF operator)

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