djangofloor.wsgi.django_runserver

class djangofloor.wsgi.django_runserver.DjangoWebSocket(wsgi_input)[source]
class djangofloor.wsgi.django_runserver.Stream(wsgi_input)[source]

Wraps the handler’s socket/rfile attributes and makes it in to a file like object that can be read from/written to by the lower level websocket api.

fileno
read
write
class djangofloor.wsgi.django_runserver.WebsocketRunServer(redis_connection=None)[source]
WS_GUID = b'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
WS_VERSIONS = ('13', '8', '7')
flush_websocket(websocket)[source]
get_ws_file_descriptor(websocket)[source]
select(rlist, wlist, xlist, timeout=None)[source]
upgrade_websocket(environ, start_response)[source]

Attempt to upgrade the socket environ[‘wsgi.input’] into a websocket enabled connection.

ws_receive_bytes(websocket)[source]
ws_send_bytes(websocket, message)[source]
djangofloor.wsgi.django_runserver.django_application(environ, start_response)[source]

Return a WSGI application which is patched to be used with websockets.

Returns:a HTTP app, or a WS app (depending on the URL path)
djangofloor.wsgi.django_runserver.run(addr, port, wsgi_handler, ipv6=False, threading=False, server_cls=<class 'django.core.servers.basehttp.WSGIServer'>)[source]

Function to monkey patch the internal Django command: manage.py runserver