The procedure shown in Figure 1 sends a UDP datagram to the specified foreign socket. The source socket is the local socket selected in the UdpOpen that returned the ConnIndex value that was used. The buffer does not include the UDP header. This header is supplied by TCP/IP.
When there is no buffer space to process the data, an error is returned. In this case, wait for a subsequent UDPdatagramSPACEavailable notification.
procedure UdpSend
(
ConnIndex: ConnectionIndexType;
ForeignSocket: SocketType;
BufferAddress: integer;
Length: integer;
var ReturnCode: CallReturnCodeType
);
external;
For a description of Pascal return codes, see Table 1.