<div dir="ltr">tcp_keepalive=yes has an effect on the underlying TCP connection.  However, simply keeping the TCP connection alive will not stop the client or server WebSocket implementation explicitly closing the connection if no WebSocket frames are received.<div>
<br></div><div>If you are using WebSockets, and you are unsure as to the behaviour of the WebSocket client (some clients will send pings themselves and some won't - it's an implementation choice) the WebSocket server should send pings on idle connections that need to be kept open.  If you want to make sure the underlying TCP connection doesn't go on you then you need to set the TCP connection parameters accordingly (the way I do it is to set the TCP connection timeout to a few seconds more than the WebSocket ping interval) - and do so for all LAN equipment in the path.</div>
<div><br></div><div>A good example is that if you are using Amazon Elastic Load-Balancer to distribute WebSocket connections, idle connections will be timed-out (by the Load-Balancer) after 60 seconds - so make sure the server sends WebSocket pings more frequently than that.</div>
<div><br></div><div>Regards,</div><div><br></div><div>Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 26 September 2013 14:21, Juha Heinanen <span dir="ltr"><<a href="mailto:jh@tutpro.com" target="_blank">jh@tutpro.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Peter Dunkley writes:<br>
<br>
> There is no TCP level stuff here, this is all at the WebSocket layer.  Take<br>
> a look at the "keepalive_.*" modparams for the websocket module.<br>
<br>
</div>are you saying that websocket transport is not implemented on top of<br>
tcp?<br>
<br>
if it is then tcp_keepalive=yes core param affects also websocket<br>
transport.<br>
<div class="HOEnZb"><div class="h5"><br>
-- juha<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div>
<div><font face="courier new, monospace">Crocodile RCS Ltd</font></div></div>
</div>