mirror of
https://github.com/django/daphne.git
synced 2025-07-14 18:02:17 +03:00
Group ref on keepalive
This commit is contained in:
parent
275bfdf1e5
commit
d4de42d3b2
|
@ -71,6 +71,8 @@ do any time. Let's try some WebSockets, and make a basic chat server!
|
||||||
Delete that consumer and its routing - we'll want the normal Django view layer to
|
Delete that consumer and its routing - we'll want the normal Django view layer to
|
||||||
serve HTTP requests from now on - and make this WebSocket consumer instead::
|
serve HTTP requests from now on - and make this WebSocket consumer instead::
|
||||||
|
|
||||||
|
from channels import Group
|
||||||
|
|
||||||
def ws_add(message):
|
def ws_add(message):
|
||||||
Group("chat").add(message.reply_channel)
|
Group("chat").add(message.reply_channel)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user