About https://github.com/django/channels

In the past I dealt with another Python WebSocket engine (unrelated to 
Django). The connection was breaking after a timeout. I solved this problem 
adding:

sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)

sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPIDLE, 150)

sock.setsockopt(socket.SOL_TCP, socket.TCP_KEEPINTVL, 150)


in the connection handler.


I strongly suspect that this is also needed for proper working of Django 
Channels.


Where can I hook this code up? (Where can I get the underlying Unix socket?)


Also probably these three sock.setsockopt calls should be added into the 
default constructor for a WebSocket. What do you think? We can provide a 
boolean argument, which when set to the non-default value would eliminate 
these extra calls. When it set to default value, should call these 
three sock.setsockopt (it should be the default, because breaking WS after 
a timeout is usually bad).

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/df05a571-7ca1-4e0c-9bfe-6c7721a3285c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to