socketio.handler

This is a lower-level transports handler. It is responsible for calling your WSGI application.

class socketio.handler.SocketIOHandler(config, *args, **kwargs)[source]

Bases: gevent.pywsgi.WSGIHandler

RE_DISCONNECT_URL = <_sre.SRE_Pattern object at 0x7fa86fe07cb0>
RE_HANDSHAKE_URL = <_sre.SRE_Pattern object at 0x7fa86fb9e8c8>
RE_REQUEST_URL = <_sre.SRE_Pattern object at 0x7fa86fe73a70>
handle_bad_request()[source]
handle_disconnect_request()[source]
handle_one_response()[source]

This function deals with ONE INCOMING REQUEST from the web.

It will wire and exchange message to the queues for long-polling methods, otherwise, will stay alive for websockets.

handler_types = {'websocket': <class 'socketio.transports.WebsocketTransport'>, 'xhr-multipart': <class 'socketio.transports.XHRMultipartTransport'>, 'htmlfile': <class 'socketio.transports.HTMLFileTransport'>, 'jsonp-polling': <class 'socketio.transports.JSONPolling'>, 'flashsocket': <class 'socketio.transports.FlashSocketTransport'>, 'xhr-polling': <class 'socketio.transports.XHRPollingTransport'>}
write_jsonp_result(data, wrapper='0')[source]
write_plain_result(data)[source]
write_smart(data)[source]