Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Networking and Sockets > Connectionless Sockets

8.6. Connectionless Sockets

So far all of our examples and the implementation of SSI used connected sockets of type SOCK_STREAM. There was a server that called listen and accept, and one or more clients that connected to it. The connection stayed open until one side or the other closed it.

By contrast, connectionless sockets don’t use a connection so listen and accept aren’t called. A sender specifies the address it wants to send to. A receiver specifies the address it wants to receive from, or it receives from anyone and is told the address of the sender. Receivers always have to bind to an external name since that’s the only way a sender can reach them. Thus, connectionless sockets are more symmetrical than connected ones; there could be a client/server relationship, but it’s more useful sometimes to think of the participants as peers.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint