Commits

Robert Brewer committed 7da896e

Better docstring for CherryPyWSGIServer.

Comments (0)

Files changed (1)

 
 
 class CherryPyWSGIServer(object):
+    """An HTTP server for WSGI.
+    
+    bind_addr: a (host, port) tuple if TCP sockets are desired;
+        for UNIX sockets, supply the filename as a string.
+    wsgi_app: the WSGI 'application callable'; multiple WSGI applications
+        may be passed as (script_name, callable) pairs.
+    numthreads: the number of worker threads to create (default 10).
+    server_name: the string to set for WSGI's SERVER_NAME environ entry.
+        Defaults to socket.gethostname().
+    max: the maximum number of queued requests (defaults to -1 = no limit).
+    request_queue_size: the 'backlog' argument to socket.listen();
+        specifies the maximum number of queued connections (default 5).
+    timeout: the timeout in seconds for accepted connections (default 10).
+    """
     
     version = "CherryPy/3.0.0alpha"
     ready = False
     
     def __init__(self, bind_addr, wsgi_app, numthreads=10, server_name=None,
                  max=-1, request_queue_size=5, timeout=10):
-        """Be careful w/ max"""
         self.requests = Queue.Queue(max)
         
         if callable(wsgi_app):
         sock = getattr(self, "socket", None)
         if sock:
             if not isinstance(self.bind_addr, basestring):
-                # Ping our own socket to make accept() return immediately.
+                # Touch our own socket to make accept() return immediately.
                 try:
                     host, port = sock.getsockname()[:2]
                 except socket.error, x:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.