DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Interprocess communication using UNIX domain sockets

Sending from datagram sockets (UNIX domain)

Datagram sockets are created and name bound exactly as are stream sockets but to send data from a datagram socket, the process uses the sendto primitive:

sendto(s, buf, buflen, flags, &to, tolen);

The parameters are the same as those described for send, except the to and tolen values are used to indicate the intended recipient of the message.

When using an unreliable datagram interface, it is unlikely any errors will be reported to the sender. If information at the sending node indicates that the message cannot be delivered, the call returns -1, and the global variable errno contains an error number.


Next topic: Receiving on datagram sockets (UNIX domain)
Previous topic: Connectionless sockets (UNIX domain)

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003