Hi,
I'm trying to write a Message Subscription, so I did these:
1. choose Channels and it''s WebsocketConsumer as my websocket-server
2. write a while loop, querying my message center every second
3. running the loop after websocket connected
and I find that:
1. I can't send a message because of the loop still running
2. daphne received the DISCONNECT signal, but the connection didn't close(still output something in loop)
so I want to know if I could:
1. kill DISCONNECTED websocket
or 2. get websocket status, so I can break the loop when status change
or 3. receive message inside the loop
I've found the dwebsocket which can receive message manually, but I prefer to use channels.
Many thanks if anyone can give me some suggestions!