【发布时间】:2019-08-09 03:46:13
【问题描述】:
所以,我找到了group_channels 函数,但这似乎并没有存储用户信息。示例:
channel_layer = get_channel_layer()
context['players_list'] = channel_layer.group_channels('lobby')
我收到{'players_list': ['daphne.response.WbZyUfNixL!sbzfJEzdPp', 'daphne.response.KfDHQnHLdw!DpoOqdGute', 'daphne.response.JqlcVVMuny!xHLDSaCzUz', 'daphne.response.mWrYVXDKoI!AjkyadSsPe']} 作为回复。
如何列出连接到 Group('lobby') 的用户?提前致谢
【问题讨论】:
标签: python django websocket django-channels