Package web2py :: Package gluon :: Module sneaky3 :: Class Sneaky
[hide private]
[frames] | no frames]

Class Sneaky

source code

the actual web server

Instance Methods [hide private]
 
__init__(self, bind_addr, wsgi_app, numthreads=10, server_name=SERVER_NAME, max_threads=None, request_queue_size=None, timeout=10, shutdown_timeout=5)
Example::
source code
 
set_listen_queue_size(self)
tries a listen argument that works
source code
 
start(self)
starts the server
source code
 
kill(self, status, frame)
kills the server
source code
 
stop(self)
tries to gracefully quit the server
source code
Method Details [hide private]

__init__(self, bind_addr, wsgi_app, numthreads=10, server_name=SERVER_NAME, max_threads=None, request_queue_size=None, timeout=10, shutdown_timeout=5)
(Constructor)

source code 

Example::

s = Sneaky('127.0.0.1:8000',test_wsgi_app,100)
s.start()

:bind_addr can be ('127.0.0.1',8000) or '127.0.0.1:8000'
:wsgi_app is a generic WSGI application
:numthreads is the min number of threads (10 by default)
:server_name ("Skeaky" by default)
:max_threads is the max number of threads or None (default)
             should be a multiple of numthreads
:request_queue_size if set to None (default) adjusts automatically
:timeout on socket IO in seconds (10 secs default)
:shotdown_timeout in seconds (5 secs default)