Sockets

Unix domain sockets are a bidirectional communication method between applications on the same machine. They are a logical endpoint that is handled by the kernel and manages the data exchange.

The nature of sockets permits using them as stream-oriented, or datagram-oriented. Stream-oriented protocols ensure that messages are delivered before moving to the next chunk of data in order to preserve message integrity. In contrast, message-oriented protocols ignore the data that is not received and keeps sending the following messages, making it a faster but less reliable protocol with very low latency.

The sockets are classified as follows:

  • SOCK_STREAM: Connection-oriented, ordered, and reliable transmission of a stream of data
  • SOCK_SEQPACKETConnection-oriented, ordered, and reliable transmission of message data that has record boundaries
  • SOCK_DGRAM: Unordered and unreliable transmission of messages
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.214.155