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

Chapter 39. The Life of a Request > Finding the Origin of a Request

Finding the Origin of a Request

Now that you have an idea of what a request is, let's discuss how connections are handled technically and how a request is born in the midst of much indirection and many abstraction layers.

When a server starts up, it binds a socket to an address on the local machine (bind(address)) and then starts to listen for connections by calling listen(backlog). When an incoming connection is detected, the accept() method is called, and this method returns a connection object and the address of the computer to which the connection was made. All this is part of the standard Python socket library and is documented in the zope.server.interfaces.ISocket interface.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint