Next: ICMP sockets, Previous: Pipe connections, Up: Client connections [Contents][Index]
The UDP sockets implement a connectionless, unreliable datagram packet service. Packets may be reordered or duplicated before they arrive. UDP generates and checks checksums to catch transmission errors.
Create a UDP connection to host at port and set the socket
descriptor in structure sock to the resulting socket. Return a
NULL
value on errors.
This function can be used for port bouncing. If you assign the
handle_request
callback to something server specific and the
cfg field of the server’s configuration to the returned socket
structure, this socket is able to handle a dedicated UDP connection to
some other UDP server.
Write buf into the send queue of the UDP socket sock. If length argument supersedes the maximum length for UDP messages it is split into smaller packets.