Implements handy wrapper to start FlashSocket server (if FlashSocket
protocol is enabled). Shamesly borrowed from the SocketTornad.IO project.
class tornadio2.server.SocketServer(application, no_keep_alive=False, io_loop=None, xheaders=False, ssl_options=None, auto_start=True)[source]
HTTP Server which does some configuration and automatic setup
of Socket.IO based on configuration.
Starts the IOLoop and listening automatically
in contrast to the Tornado default behavior.
If FlashSocket is enabled, starts up the policy server also.
__init__(application, no_keep_alive=False, io_loop=None, xheaders=False, ssl_options=None, auto_start=True)[source]
Initializes the server with the given request callback.
If you use pre-forking/start() instead of the listen() method to
start your server, you should not pass an IOLoop instance to this
constructor. Each pre-forked child process will create its own
IOLoop instance after the forking process.
- Tornado application
- Support keep alive for HTTP connections or not
- Optional io_loop instance.
- Extra headers
- Tornado SSL options
- Set auto_start to False in order to have opportunities
to work with server object and/or perform some actions
after server is already created but before ioloop will start.
Attention: if you use auto_start param set to False
you should start ioloop manually