{
    "content": [
        {
            "type": "text",
            "text": "# socketserver (pydoc)\n\n**Summary:** socketserver - Generic socket server classes.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **DESCRIPTION** (89 lines) — 1 subsections\n  - handle (25 lines)\n- **CLASSES** (18 lines) — 16 subsections\n  - class BaseRequestHandler (36 lines)\n  - class BaseServer (130 lines)\n  - class DatagramRequestHandler (32 lines)\n  - class ForkingMixIn (42 lines)\n  - class ForkingTCPServer (131 lines)\n  - class ForkingUDPServer (140 lines)\n  - class StreamRequestHandler (43 lines)\n  - class TCPServer (166 lines)\n  - class ThreadingMixIn (30 lines)\n  - class ThreadingTCPServer (135 lines)\n  - class ThreadingUDPServer (144 lines)\n  - class ThreadingUnixDatagramServer (148 lines)\n  - class ThreadingUnixStreamServer (139 lines)\n  - class UDPServer (134 lines)\n  - class UnixDatagramServer (136 lines)\n  - class UnixStreamServer (127 lines)\n- **DATA** (2 lines)\n- **VERSION** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nsocketserver - Generic socket server classes.\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/socketserver.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n\n### DESCRIPTION\n\nThis module tries to capture the various aspects of defining a server:\n\nFor socket-based servers:\n\n- address family:\n- AFINET{,6}: IP (Internet Protocol) sockets (default)\n- AFUNIX: Unix domain sockets\n- others, e.g. AFDECNET are conceivable (see <socket.h>\n- socket type:\n- SOCKSTREAM (reliable stream, e.g. TCP)\n- SOCKDGRAM (datagrams, e.g. UDP)\n\nFor request-based servers (including socket-based):\n\n- client address verification before further looking at the request\n(This is actually a hook for any processing that needs to look\nat the request before anything else, e.g. logging)\n- how to handle multiple requests:\n- synchronous (one request is handled at a time)\n- forking (each request is handled by a new process)\n- threading (each request is handled by a new thread)\n\nThe classes in this module favor the server type that is simplest to\nwrite: a synchronous TCP/IP server.  This is bad class design, but\nsaves some typing.  (There's also the issue that a deep class hierarchy\nslows down method lookups.)\n\nThere are five classes in an inheritance diagram, four of which represent\nsynchronous servers of four types:\n\n+------------+\n| BaseServer |\n+------------+\n|\nv\n+-----------+        +------------------+\n| TCPServer |------->| UnixStreamServer |\n+-----------+        +------------------+\n|\nv\n+-----------+        +--------------------+\n| UDPServer |------->| UnixDatagramServer |\n+-----------+        +--------------------+\n\nNote that UnixDatagramServer derives from UDPServer, not from\nUnixStreamServer -- the only difference between an IP and a Unix\nstream server is the address family, which is simply repeated in both\nunix server classes.\n\nForking and threading versions of each type of server can be created\nusing the ForkingMixIn and ThreadingMixIn mix-in classes.  For\ninstance, a threading UDP server class is created as follows:\n\nclass ThreadingUDPServer(ThreadingMixIn, UDPServer): pass\n\nThe Mix-in class must come first, since it overrides a method defined\nin UDPServer! Setting the various member variables also changes\nthe behavior of the underlying server mechanism.\n\nTo implement a service, you must derive a class from\nBaseRequestHandler and redefine its handle() method.  You can then run\nvarious versions of the service by combining one of the server classes\nwith your request handler class.\n\nThe request handler class must be different for datagram or stream\nservices.  This can be hidden by using the request handler\nsubclasses StreamRequestHandler or DatagramRequestHandler.\n\nOf course, you still have to use your head!\n\nFor instance, it makes no sense to use a forking server if the service\ncontains state in memory that can be modified by requests (since the\nmodifications in the child process would never reach the initial state\nkept in the parent process and passed to each child).  In this case,\nyou can use a threading server, but you will probably have to use\nlocks to avoid two requests that come in nearly simultaneous to apply\nconflicting changes to the server state.\n\nOn the other hand, if you are building e.g. an HTTP server, where all\ndata is stored externally (e.g. in the file system), a synchronous\nclass will essentially render the service \"deaf\" while one request is\nbeing handled -- which may be for a very long time if a client is slow\nto read all the data it has requested.  Here a threading or forking\nserver is appropriate.\n\nIn some cases, it may be appropriate to process part of a request\nsynchronously, but to finish processing in a forked child depending on\nthe request data.  This can be implemented by using a synchronous\nserver and doing an explicit fork in the request handler class\n\n#### handle\n\nAnother approach to handling multiple simultaneous requests in an\nenvironment that supports neither threads nor fork (or where these are\ntoo expensive or inappropriate for the service) is to maintain an\nexplicit table of partially finished requests and to use a selector to\ndecide which request to work on next (or whether to handle a new\nincoming request).  This is particularly important for stream services\nwhere each client can potentially be connected for a long time (if\nthreads or subprocesses cannot be used).\n\nFuture work:\n- Standard classes for Sun RPC (which uses either UDP or TCP)\n- Standard mix-in classes to implement various authentication\nand encryption schemes\n\nXXX Open problems:\n- What to do with out-of-band data?\n\nBaseServer:\n- split generic \"request\" functionality out into BaseServer class.\nCopyright (C) 2000  Luke Kenneth Casson Leighton <lkcl@samba.org>\n\nexample: read entries from a SQL database (requires overriding\ngetrequest() to return a table entry from the database).\nentry is processed by a RequestHandlerClass.\n\n### CLASSES\n\nbuiltins.object\nBaseRequestHandler\nDatagramRequestHandler\nStreamRequestHandler\nBaseServer\nTCPServer\nUDPServer\nUnixDatagramServer\nUnixStreamServer\nForkingMixIn\nForkingTCPServer(ForkingMixIn, TCPServer)\nForkingUDPServer(ForkingMixIn, UDPServer)\nThreadingMixIn\nThreadingTCPServer(ThreadingMixIn, TCPServer)\nThreadingUDPServer(ThreadingMixIn, UDPServer)\nThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer)\nThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer)\n\n#### class BaseRequestHandler\n\n|  BaseRequestHandler(request, clientaddress, server)\n|\n|  Base class for request handler classes.\n|\n|  This class is instantiated for each request to be handled.  The\n|  constructor sets the instance variables request, clientaddress\n|  and server, and then calls the handle() method.  To implement a\n|  specific service, all you need to do is to derive a class which\n|  defines a handle() method.\n|\n|  The handle() method can find the request as self.request, the\n|  client address as self.clientaddress, and the server (in case it\n|  needs access to per-server information) as self.server.  Since a\n|  separate instance is created for each request, the handle() method\n|  can define other arbitrary instance variables.\n|\n|  Methods defined here:\n|\n|  init(self, request, clientaddress, server)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  finish(self)\n|\n|  handle(self)\n|\n|  setup(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n#### class BaseServer\n\n|  BaseServer(serveraddress, RequestHandlerClass)\n|\n|  Base class for server classes.\n|\n|  Methods for the caller:\n|\n|  - init(serveraddress, RequestHandlerClass)\n|  - serveforever(pollinterval=0.5)\n|  - shutdown()\n|  - handlerequest()  # if you do not use serveforever()\n|  - fileno() -> int   # for selector\n|\n|  Methods that may be overridden:\n|\n|  - serverbind()\n|  - serveractivate()\n|  - getrequest() -> request, clientaddress\n|  - handletimeout()\n|  - verifyrequest(request, clientaddress)\n|  - serverclose()\n|  - processrequest(request, clientaddress)\n|  - shutdownrequest(request)\n|  - closerequest(request)\n|  - serviceactions()\n|  - handleerror()\n|\n|  Methods for derived classes:\n|\n|  - finishrequest(request, clientaddress)\n|\n|  Class variables that may be overridden by derived classes or\n|  instances:\n|\n|  - timeout\n|  - addressfamily\n|  - sockettype\n|  - allowreuseaddress\n|\n|  Instance variables:\n|\n|  - RequestHandlerClass\n|  - socket\n|\n|  Methods defined here:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  init(self, serveraddress, RequestHandlerClass)\n|      Constructor.  May be extended, do not override.\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  processrequest(self, request, clientaddress)\n|      Call finishrequest.\n|\n|      Overridden by ForkingMixIn and ThreadingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  serverclose(self)\n|      Called to clean-up the server.\n|\n|      May be overridden.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  timeout = None\n\n#### class DatagramRequestHandler\n\n|  DatagramRequestHandler(request, clientaddress, server)\n|\n|  Define self.rfile and self.wfile for datagram sockets.\n|\n|  Method resolution order:\n|      DatagramRequestHandler\n|      BaseRequestHandler\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  finish(self)\n|\n|  setup(self)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseRequestHandler:\n|\n|  init(self, request, clientaddress, server)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  handle(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from BaseRequestHandler:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n#### class ForkingMixIn\n\n|  Mix-in class to handle each request in a new process.\n|\n|  Methods defined here:\n|\n|  collectchildren(self, *, blocking=False)\n|      Internal routine to wait for children that have exited.\n|\n|  handletimeout(self)\n|      Wait for zombies after self.timeout seconds of inactivity.\n|\n|      May be extended, do not override.\n|\n|  processrequest(self, request, clientaddress)\n|      Fork a new subprocess to process the request.\n|\n|  serverclose(self)\n|\n|  serviceactions(self)\n|      Collect the zombie child processes regularly in the ForkingMixIn.\n|\n|      serviceactions is called in the BaseServer's serveforever loop.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  activechildren = None\n|\n|  blockonclose = True\n|\n|  maxchildren = 40\n|\n|  timeout = 300\n\n#### class ForkingTCPServer\n\n|  ForkingTCPServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      ForkingTCPServer\n|      ForkingMixIn\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods inherited from ForkingMixIn:\n|\n|  collectchildren(self, *, blocking=False)\n|      Internal routine to wait for children that have exited.\n|\n|  handletimeout(self)\n|      Wait for zombies after self.timeout seconds of inactivity.\n|\n|      May be extended, do not override.\n|\n|  processrequest(self, request, clientaddress)\n|      Fork a new subprocess to process the request.\n|\n|  serverclose(self)\n|\n|  serviceactions(self)\n|      Collect the zombie child processes regularly in the ForkingMixIn.\n|\n|      serviceactions is called in the BaseServer's serveforever loop.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from ForkingMixIn:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from ForkingMixIn:\n|\n|  activechildren = None\n|\n|  blockonclose = True\n|\n|  maxchildren = 40\n|\n|  timeout = 300\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  addressfamily = <AddressFamily.AFINET: 2>\n|\n|  allowreuseaddress = False\n|\n|  requestqueuesize = 5\n|\n|  sockettype = <SocketKind.SOCKSTREAM: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n\n#### class ForkingUDPServer\n\n|  ForkingUDPServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      ForkingUDPServer\n|      ForkingMixIn\n|      UDPServer\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods inherited from ForkingMixIn:\n|\n|  collectchildren(self, *, blocking=False)\n|      Internal routine to wait for children that have exited.\n|\n|  handletimeout(self)\n|      Wait for zombies after self.timeout seconds of inactivity.\n|\n|      May be extended, do not override.\n|\n|  processrequest(self, request, clientaddress)\n|      Fork a new subprocess to process the request.\n|\n|  serverclose(self)\n|\n|  serviceactions(self)\n|      Collect the zombie child processes regularly in the ForkingMixIn.\n|\n|      serviceactions is called in the BaseServer's serveforever loop.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from ForkingMixIn:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from ForkingMixIn:\n|\n|  activechildren = None\n|\n|  blockonclose = True\n|\n|  maxchildren = 40\n|\n|  timeout = 300\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from UDPServer:\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from UDPServer:\n|\n|  allowreuseaddress = False\n|\n|  maxpacketsize = 8192\n|\n|  sockettype = <SocketKind.SOCKDGRAM: 2>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  addressfamily = <AddressFamily.AFINET: 2>\n|\n|  requestqueuesize = 5\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n\n#### class StreamRequestHandler\n\n|  StreamRequestHandler(request, clientaddress, server)\n|\n|  Define self.rfile and self.wfile for stream sockets.\n|\n|  Method resolution order:\n|      StreamRequestHandler\n|      BaseRequestHandler\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  finish(self)\n|\n|  setup(self)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  disablenaglealgorithm = False\n|\n|  rbufsize = -1\n|\n|  timeout = None\n|\n|  wbufsize = 0\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseRequestHandler:\n|\n|  init(self, request, clientaddress, server)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  handle(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from BaseRequestHandler:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n#### class TCPServer\n\n|  TCPServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Base class for various socket-based server classes.\n|\n|  Defaults to synchronous IP stream (i.e., TCP).\n|\n|  Methods for the caller:\n|\n|  - init(serveraddress, RequestHandlerClass, bindandactivate=True)\n|  - serveforever(pollinterval=0.5)\n|  - shutdown()\n|  - handlerequest()  # if you don't use serveforever()\n|  - fileno() -> int   # for selector\n|\n|  Methods that may be overridden:\n|\n|  - serverbind()\n|  - serveractivate()\n|  - getrequest() -> request, clientaddress\n|  - handletimeout()\n|  - verifyrequest(request, clientaddress)\n|  - processrequest(request, clientaddress)\n|  - shutdownrequest(request)\n|  - closerequest(request)\n|  - handleerror()\n|\n|  Methods for derived classes:\n|\n|  - finishrequest(request, clientaddress)\n|\n|  Class variables that may be overridden by derived classes or\n|  instances:\n|\n|  - timeout\n|  - addressfamily\n|  - sockettype\n|  - requestqueuesize (only for stream sockets)\n|  - allowreuseaddress\n|\n|  Instance variables:\n|\n|  - serveraddress\n|  - RequestHandlerClass\n|  - socket\n|\n|  Method resolution order:\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  serverclose(self)\n|      Called to clean-up the server.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  addressfamily = <AddressFamily.AFINET: 2>\n|\n|  allowreuseaddress = False\n|\n|  requestqueuesize = 5\n|\n|  sockettype = <SocketKind.SOCKSTREAM: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  processrequest(self, request, clientaddress)\n|      Call finishrequest.\n|\n|      Overridden by ForkingMixIn and ThreadingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from BaseServer:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n#### class ThreadingMixIn\n\n|  Mix-in class to handle each request in a new thread.\n|\n|  Methods defined here:\n|\n|  processrequest(self, request, clientaddress)\n|      Start a new thread to process the request.\n|\n|  processrequestthread(self, request, clientaddress)\n|      Same as in BaseServer but as a thread.\n|\n|      In addition, exception handling is done here.\n|\n|  serverclose(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  blockonclose = True\n|\n|  daemonthreads = False\n\n#### class ThreadingTCPServer\n\n|  ThreadingTCPServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      ThreadingTCPServer\n|      ThreadingMixIn\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods inherited from ThreadingMixIn:\n|\n|  processrequest(self, request, clientaddress)\n|      Start a new thread to process the request.\n|\n|  processrequestthread(self, request, clientaddress)\n|      Same as in BaseServer but as a thread.\n|\n|      In addition, exception handling is done here.\n|\n|  serverclose(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from ThreadingMixIn:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from ThreadingMixIn:\n|\n|  blockonclose = True\n|\n|  daemonthreads = False\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  addressfamily = <AddressFamily.AFINET: 2>\n|\n|  allowreuseaddress = False\n|\n|  requestqueuesize = 5\n|\n|  sockettype = <SocketKind.SOCKSTREAM: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n#### class ThreadingUDPServer\n\n|  ThreadingUDPServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      ThreadingUDPServer\n|      ThreadingMixIn\n|      UDPServer\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods inherited from ThreadingMixIn:\n|\n|  processrequest(self, request, clientaddress)\n|      Start a new thread to process the request.\n|\n|  processrequestthread(self, request, clientaddress)\n|      Same as in BaseServer but as a thread.\n|\n|      In addition, exception handling is done here.\n|\n|  serverclose(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from ThreadingMixIn:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from ThreadingMixIn:\n|\n|  blockonclose = True\n|\n|  daemonthreads = False\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from UDPServer:\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from UDPServer:\n|\n|  allowreuseaddress = False\n|\n|  maxpacketsize = 8192\n|\n|  sockettype = <SocketKind.SOCKDGRAM: 2>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  addressfamily = <AddressFamily.AFINET: 2>\n|\n|  requestqueuesize = 5\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n#### class ThreadingUnixDatagramServer\n\n|  ThreadingUnixDatagramServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      ThreadingUnixDatagramServer\n|      ThreadingMixIn\n|      UnixDatagramServer\n|      UDPServer\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods inherited from ThreadingMixIn:\n|\n|  processrequest(self, request, clientaddress)\n|      Start a new thread to process the request.\n|\n|  processrequestthread(self, request, clientaddress)\n|      Same as in BaseServer but as a thread.\n|\n|      In addition, exception handling is done here.\n|\n|  serverclose(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from ThreadingMixIn:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from ThreadingMixIn:\n|\n|  blockonclose = True\n|\n|  daemonthreads = False\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from UnixDatagramServer:\n|\n|  addressfamily = <AddressFamily.AFUNIX: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from UDPServer:\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from UDPServer:\n|\n|  allowreuseaddress = False\n|\n|  maxpacketsize = 8192\n|\n|  sockettype = <SocketKind.SOCKDGRAM: 2>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  requestqueuesize = 5\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n#### class ThreadingUnixStreamServer\n\n|  ThreadingUnixStreamServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      ThreadingUnixStreamServer\n|      ThreadingMixIn\n|      UnixStreamServer\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods inherited from ThreadingMixIn:\n|\n|  processrequest(self, request, clientaddress)\n|      Start a new thread to process the request.\n|\n|  processrequestthread(self, request, clientaddress)\n|      Same as in BaseServer but as a thread.\n|\n|      In addition, exception handling is done here.\n|\n|  serverclose(self)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from ThreadingMixIn:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from ThreadingMixIn:\n|\n|  blockonclose = True\n|\n|  daemonthreads = False\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from UnixStreamServer:\n|\n|  addressfamily = <AddressFamily.AFUNIX: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  allowreuseaddress = False\n|\n|  requestqueuesize = 5\n|\n|  sockettype = <SocketKind.SOCKSTREAM: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n#### class UDPServer\n\n|  UDPServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  UDP server class.\n|\n|  Method resolution order:\n|      UDPServer\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  allowreuseaddress = False\n|\n|  maxpacketsize = 8192\n|\n|  sockettype = <SocketKind.SOCKDGRAM: 2>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  serverclose(self)\n|      Called to clean-up the server.\n|\n|      May be overridden.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  addressfamily = <AddressFamily.AFINET: 2>\n|\n|  requestqueuesize = 5\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  processrequest(self, request, clientaddress)\n|      Call finishrequest.\n|\n|      Overridden by ForkingMixIn and ThreadingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from BaseServer:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n#### class UnixDatagramServer\n\n|  UnixDatagramServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      UnixDatagramServer\n|      UDPServer\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Data and other attributes defined here:\n|\n|  addressfamily = <AddressFamily.AFUNIX: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from UDPServer:\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from UDPServer:\n|\n|  allowreuseaddress = False\n|\n|  maxpacketsize = 8192\n|\n|  sockettype = <SocketKind.SOCKDGRAM: 2>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  serverclose(self)\n|      Called to clean-up the server.\n|\n|      May be overridden.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  requestqueuesize = 5\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  processrequest(self, request, clientaddress)\n|      Call finishrequest.\n|\n|      Overridden by ForkingMixIn and ThreadingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from BaseServer:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n#### class UnixStreamServer\n\n|  UnixStreamServer(serveraddress, RequestHandlerClass, bindandactivate=True)\n|\n|  Method resolution order:\n|      UnixStreamServer\n|      TCPServer\n|      BaseServer\n|      builtins.object\n|\n|  Data and other attributes defined here:\n|\n|  addressfamily = <AddressFamily.AFUNIX: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TCPServer:\n|\n|  init(self, serveraddress, RequestHandlerClass, bindandactivate=True)\n|      Constructor.  May be extended, do not override.\n|\n|  closerequest(self, request)\n|      Called to clean up an individual request.\n|\n|  fileno(self)\n|      Return socket file number.\n|\n|      Interface required by selector.\n|\n|  getrequest(self)\n|      Get the request and client address from the socket.\n|\n|      May be overridden.\n|\n|  serveractivate(self)\n|      Called by constructor to activate the server.\n|\n|      May be overridden.\n|\n|  serverbind(self)\n|      Called by constructor to bind the socket.\n|\n|      May be overridden.\n|\n|  serverclose(self)\n|      Called to clean-up the server.\n|\n|      May be overridden.\n|\n|  shutdownrequest(self, request)\n|      Called to shutdown and close an individual request.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from TCPServer:\n|\n|  allowreuseaddress = False\n|\n|  requestqueuesize = 5\n|\n|  sockettype = <SocketKind.SOCKSTREAM: 1>\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from BaseServer:\n|\n|  enter(self)\n|\n|  exit(self, *args)\n|\n|  finishrequest(self, request, clientaddress)\n|      Finish one request by instantiating RequestHandlerClass.\n|\n|  handleerror(self, request, clientaddress)\n|      Handle an error gracefully.  May be overridden.\n|\n|      The default is to print a traceback and continue.\n|\n|  handlerequest(self)\n|      Handle one request, possibly blocking.\n|\n|      Respects self.timeout.\n|\n|  handletimeout(self)\n|      Called if no new request arrives within self.timeout.\n|\n|      Overridden by ForkingMixIn.\n|\n|  processrequest(self, request, clientaddress)\n|      Call finishrequest.\n|\n|      Overridden by ForkingMixIn and ThreadingMixIn.\n|\n|  serveforever(self, pollinterval=0.5)\n|      Handle one request at a time until shutdown.\n|\n|      Polls for shutdown every pollinterval seconds. Ignores\n|      self.timeout. If you need to do periodic tasks, do them in\n|      another thread.\n|\n|  serviceactions(self)\n|      Called by the serveforever() loop.\n|\n|      May be overridden by a subclass / Mixin to implement any code that\n|      needs to be run during the loop.\n|\n|  shutdown(self)\n|      Stops the serveforever loop.\n|\n|      Blocks until the loop has finished. This must be called while\n|      serveforever() is running in another thread, or it will\n|      deadlock.\n|\n|  verifyrequest(self, request, clientaddress)\n|      Verify the request.  May be overridden.\n|\n|      Return True if we should proceed with this request.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from BaseServer:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from BaseServer:\n|\n|  timeout = None\n\n### DATA\n\nall = ['BaseServer', 'TCPServer', 'UDPServer', 'ThreadingUDPServer...\n\n### VERSION\n\n0.4\n\n### FILE\n\n/usr/lib/python3.10/socketserver.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "socketserver",
        "section": "",
        "mode": "pydoc",
        "summary": "socketserver - Generic socket server classes.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODULE REFERENCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 89,
                "subsections": [
                    {
                        "name": "handle",
                        "lines": 25
                    }
                ]
            },
            {
                "name": "CLASSES",
                "lines": 18,
                "subsections": [
                    {
                        "name": "class BaseRequestHandler",
                        "lines": 36
                    },
                    {
                        "name": "class BaseServer",
                        "lines": 130
                    },
                    {
                        "name": "class DatagramRequestHandler",
                        "lines": 32
                    },
                    {
                        "name": "class ForkingMixIn",
                        "lines": 42
                    },
                    {
                        "name": "class ForkingTCPServer",
                        "lines": 131
                    },
                    {
                        "name": "class ForkingUDPServer",
                        "lines": 140
                    },
                    {
                        "name": "class StreamRequestHandler",
                        "lines": 43
                    },
                    {
                        "name": "class TCPServer",
                        "lines": 166
                    },
                    {
                        "name": "class ThreadingMixIn",
                        "lines": 30
                    },
                    {
                        "name": "class ThreadingTCPServer",
                        "lines": 135
                    },
                    {
                        "name": "class ThreadingUDPServer",
                        "lines": 144
                    },
                    {
                        "name": "class ThreadingUnixDatagramServer",
                        "lines": 148
                    },
                    {
                        "name": "class ThreadingUnixStreamServer",
                        "lines": 139
                    },
                    {
                        "name": "class UDPServer",
                        "lines": 134
                    },
                    {
                        "name": "class UnixDatagramServer",
                        "lines": 136
                    },
                    {
                        "name": "class UnixStreamServer",
                        "lines": 127
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}