Package web2py :: Package gluon :: Module sneaky2 :: 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='Sneaky', max_threads=None, request_queue_size=None, timeout=10, shutdown_timeout=5, numprocesses=1, dispatcherport=8765)
Example::
source code
 
set_listen_queue_size(self)
tries a listen argument that works
source code
 
start(self)
starts 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='Sneaky', max_threads=None, request_queue_size=None, timeout=10, shutdown_timeout=5, numprocesses=1, dispatcherport=8765)
(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)