所有操作均在ubuntu下测试进行!!!
- uwsgi
#dwebsocket作者在github详细说明了配置要求:https://github.com/duanhongyi/dwebsocket
#If you want to use the uwsgi backend, add WEBSOCKET_FACTORY_CLASS in the settings.py file:
WEBSOCKET_FACTORY_CLASS = 'dwebsocket.backends.uwsgi.factory.uWsgiWebSocketFactory'
#Run uwsgi:
uwsgi --http :8080 --http-websockets --processes 1 --wsgi-file wsgi.py--async 30 --ugreen --http-timeout 300
以下,均是我测试过程中碰到的报错:
WebSocket connection to ‘ws://*****’ failed: Error during WebSocket handshake: Unexpected response code: 400
#Solution
#在django的