django-websocket-redis icon indicating copy to clipboard operation
django-websocket-redis copied to clipboard

publish 'websocket closed' on browser close [broadcast channel]

Open arafiq opened this issue 10 years ago • 2 comments

My apologies in advance if this question has been answered. But I am trying to publish a message on a broadcast channel when a user closes the browser. I am currently working on a project where a user 'locks' the page (through logic) and this 'lock' is released when the user exists the page. Meanwhile. other user(s) can enter this same page but will be in read-only mode. My goal is once the first user exits the browser, the other users will get a message (through receive_message) stating that they can access the lock on the page.

arafiq avatar Feb 23 '15 19:02 arafiq

This feature is really requested, see #29, #70 and #43. If I have some time, I'll try to implement this.

jrief avatar Feb 23 '15 22:02 jrief

I've been trying to implement this feature where I can publish message on page clos. One thing I am trying to differentiate is a websocket.close() on a webpage close and on a webpage refresh. The status code is '200' on both situations (wsgi_server.WebsocketWSGIServer.call). Can we differentiate between a webpage refresh and a webpage close?

arafiq avatar Mar 06 '15 16:03 arafiq