|
|
To receive data on an unconnected datagram socket,
use recvfrom:
recvfrom (s, buf, buflen, flags, (struct sockaddr *) &from, &fromlen);
fromlen initially contains the size of the from buffer, and is modified on return to indicate the actual size of the address from which the datagram was received.
For an example, see ``Reading Internet domain datagrams''.