Datagram sockets support connectionless communications in the Internet communications domains AF_INET and AF_INET6, and in the local host communications domain AF_UNIX. A datagram socket provides bidirectional data flow. However, datagram sockets do not ensure either secure or sequential data transfer. It is also possible that the data is transferred more than once. A process which receives messages on a datagram socket may therefore possibly receive the messages more than once and/or in a different order from that transmitted. The application therefore has the responsibility of checking and saving the received data. One important characteristic of datagram sockets is that the record limits of the transferred data are retained.
Datagram sockets are used to develop connectionless communications applications based on the UDP protocol.