www.delorie.com/gnu/docs/glibc/libc_342.html   search  
Buy the book!

The GNU C Library

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.10 Datagram Socket Operations

This section describes how to use communication styles that don't use connections (styles SOCK_DGRAM and SOCK_RDM). Using these styles, you group data into packets and each packet is an independent communication. You specify the destination for each packet individually.

Datagram packets are like letters: you send each one independently with its own destination address, and they may arrive in the wrong order or not at all.

The listen and accept functions are not allowed for sockets using connectionless communication styles.

16.10.1 Sending Datagrams  Sending packets on a datagram socket.
16.10.2 Receiving Datagrams  Receiving packets on a datagram socket.
16.10.3 Datagram Socket Example  An example program: packets sent over a datagram socket in the local namespace.
16.10.4 Example of Reading Datagrams  Another program, that receives those packets.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003