Like NBS.UDP_ReceiveBuffer this function block ⇘ CAA_NetBaseServices.library serves to receive data from a connection given in hPeer. As long as xEnable is TRUE, the handle of the peer is valid. The function block returns the handle of the buffer containing the data. As long as xReady is TRUE, a new handle for the buffer can arrive. ipFrom and uiPortFrom indicate the IP and port the data was received from. The buffer is passed on and not copied like at ⇘ NBS.UDP_Receive.
Output:
xDone |
BOOL |
see: ⇘ “CAA 指南” |
xBusy |
BOOL |
see: ⇘ “CAA 指南” |
xError |
BOOL |
see: ⇘ “CAA 指南” |
eError |
NBS.ERROR |
Error id |
xReady |
BOOL |
TRUE: Data received – Handle of buffer is valid FALSE: No data received – Handle of buffer is invalid |
ipFrom |
NBS.IP_ADDR |
The IP address the data was received from |
uiPortFrom |
UINT |
The port the data was received from |
hBuffer |
CAA.HANDLE |
Handle of the buffer which contains the received data |