Re: Django Channels - Class Based Consumers

2017-04-05 Thread Dan Alderman
That makes sense. I got myself in such a muddle I somehow ended up knowing less about Channels than I did a couple of weeks go. Thanks very much for the help! On Wednesday, 5 April 2017 09:18:58 UTC+1, Andrew Godwin wrote: > > The stream is the name of the stream inside the Multiplexer - it's

Re: Django Channels - Class Based Consumers

2017-04-05 Thread Andrew Godwin
The stream is the name of the stream inside the Multiplexer - it's like a sub-channel inside the WebSocket that is used by either end to distinguish packets from each other (it's why you provide it to the JavaScript binding - it needs to know which stream to listen to) Andrew On Wed, Apr 5, 2017

Re: Django Channels - Class Based Consumers

2017-04-05 Thread Dan Alderman
Hi Andrew, Many thanks for your input - that does indeed help. What was really confusing me was what arguments I actually needed to supply to the JsonWebsocketConsumer.group_send() function. Not fully understanding classmethods, I was trying to pass the cls argument as well. I understand

Re: Django Channels - Class Based Consumers

2017-04-04 Thread Andrew Godwin
Hi Dan, An initial glance shows that you might be passing the arguments wrong to Multiplexer.group_send(group_name, stream, payload) - I'm not sure why you are using multiplexer.__class__.__name__ as the group name, but the group name you configured in connection_groups is updatedb_results, and

Django Channels - Class Based Consumers

2017-04-04 Thread Dan Alderman
Hi guys, Been trying to get my head around this for ages now but still no luck, hopefully someone can point me in the right direction. I'm trying to set up a Demultiplexer with a JsonWebsocketConsumer that sends to a group. (There is only one stream in the Demultiplexer at the moment, but I