I'm using:

When the user connects to the websocket, I do the following:

def connect(self, message, **kwargs):
    group = Group('user-%s' % user.uuid)
    # Do not use more than one device.
    group.send({"close": True}, immediately=True)

I've created this method to send information to some specific user:

from channels.generic.websockets import WebsocketMultiplexer

def custom_reply(uuid: UUID, stream, action, data={}, response_status=200):
    if type(action) is ActionType:
        action = action.value

    payload = {
        'errors': [],
        'data': data,
        'action': action,
        'response_status': response_status

    WebsocketMultiplexer.group_send(name='user-%s' % uuid,

 For several minutes this method sends the message to the client, after a 
while it seems that the users within the group are being reset and then the 
client is losing message

You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to