File tree Expand file tree Collapse file tree 2 files changed +23
-9
lines changed
examples/server/wsgi/django_socketio Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,18 @@ You can run it with the Django development web server:
9
9
python manage.py runserver
10
10
```
11
11
12
- When running in this mode, you will see a warning indicating that the WebSocket
13
- transport is not available, which is not supported by this web server.
12
+ When running in this mode, you will get an error message:
14
13
15
- See the documentation for information on supported deployment methods that you
16
- can use to add support for WebSocket.
14
+ RuntimeError: Cannot obtain socket from WSGI environment.
15
+
16
+ This is expected, and it happens because the Django web server does not support
17
+ the WebSocket protocol. You can ignore the error, as the server will still work
18
+ using long-polling.
19
+
20
+ To run the application with WebSocket enabled, you can use the Gunicorn web
21
+ server as follows:
22
+
23
+ gunicorn -b :8000 --threads 100 --access-logfile - django_socketio.wsgi:application
24
+
25
+ See the documentation for information on other supported deployment methods
26
+ that you can use to add support for WebSocket.
Original file line number Diff line number Diff line change 1
- asgiref == 3.5.2
1
+ asgiref == 3.6.0
2
2
backports.zoneinfo == 0.2.1
3
- bidict == 0.22.0
4
- Django == 4.1.9
5
- python-engineio == 4.3.2
6
- python-socketio == 5.6.0
3
+ bidict == 0.22.1
4
+ Django == 4.2.1
5
+ gunicorn == 20.1.0
6
+ h11 == 0.14.0
7
+ python-engineio == 4.4.1
8
+ python-socketio == 5.8.0
9
+ simple-websocket == 0.10.0
7
10
sqlparse == 0.4.4
11
+ wsproto == 1.2.0
You can’t perform that action at this time.
0 commit comments