Changeset 1216
- Timestamp:
- 08/05/06 17:11:57
- Files:
-
- trunk/cherrypy/_cpwsgiserver.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpwsgiserver.py
r1213 r1216 223 223 224 224 class CherryPyWSGIServer(object): 225 """An HTTP server for WSGI. 226 227 bind_addr: a (host, port) tuple if TCP sockets are desired; 228 for UNIX sockets, supply the filename as a string. 229 wsgi_app: the WSGI 'application callable'; multiple WSGI applications 230 may be passed as (script_name, callable) pairs. 231 numthreads: the number of worker threads to create (default 10). 232 server_name: the string to set for WSGI's SERVER_NAME environ entry. 233 Defaults to socket.gethostname(). 234 max: the maximum number of queued requests (defaults to -1 = no limit). 235 request_queue_size: the 'backlog' argument to socket.listen(); 236 specifies the maximum number of queued connections (default 5). 237 timeout: the timeout in seconds for accepted connections (default 10). 238 """ 225 239 226 240 version = "CherryPy/3.0.0alpha" … … 231 245 def __init__(self, bind_addr, wsgi_app, numthreads=10, server_name=None, 232 246 max=-1, request_queue_size=5, timeout=10): 233 """Be careful w/ max"""234 247 self.requests = Queue.Queue(max) 235 248 … … 366 379 if sock: 367 380 if not isinstance(self.bind_addr, basestring): 368 # Pingour own socket to make accept() return immediately.381 # Touch our own socket to make accept() return immediately. 369 382 try: 370 383 host, port = sock.getsockname()[:2]

