Ejemplo n.º 1
0
 def listen(self, port=None, host='', backlog=1024):
     """
     Begins listening on the given host and port.
     
     Args:
         port: The port to listen on. Optional. If not specified, will be
             set to 80 for regular HTTP, or 443 if SSL options have been
             set.
         host: The hostname to listen on. Defaults to ''.
         backlog: The maximum number of queued connections. Defaults
             to 1024.
     """
     if not port:
         if self.ssl_options:
             port = 443
         else:
             port = 80
     
     SSLServer.listen(self, port, host, backlog)