NBS.UDP_Send (FB)

This function block of the CAA_NetBaseServices.library serves to send data over the connection given in hPeer. The content of the memory area indicated by pointer pData contains the data to be written. szSize defines the number of bytes to be written. When xDone is set to TRUE the data was written successfully.

Input:

xExecute

BOOL

see: “CAA 指南”

udiTimeOut

UDINT

The time after which an FB (e.g. requiring an external acknowledgement) aborts operation due to a timeout with error message

hPeer

CAA.HANDLE

Handle of Peer

ipAddr

NBS.IP_ADDR

The ip address the data should be sent across

uiPort

UINT

The port the data should be sent across

szSize

CAA.SIZE

Number of bytes to be sent; can be retrieved via operator SIZEOF

pData

CAA.PVOID

The address from where the data can be fetched; can be retrieved with the help of operator ADR

Output:

xDone

BOOL

see: “CAA 指南”

xBusy

BOOL

see: “CAA 指南”

xError

BOOL

see: “CAA 指南”

eError

NBS.ERROR

Error id