Right after that I can see [{"channel":"/meta/connect","clientId":"randomnumber","connectionType":"websocket","id":"5"}].I went through the docs but I didn't got enough information.
If I increase this timeout value in server will it give use some more performance again?
More over we are having secure check on handshake.
Thanks for the clarification.
--
You received this message because you are subscribed to the Google Groups "Faye users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to faye-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
What is the rationale for still requiring timeout's and connect handshakes on WebSocket connections?
You said "No, and it will make the client take longer to detect certain kinds of errors." but that only seems true for non-websocket transports since websocket one sends periodic ping already.
It seems slightly redundant having client timeout and re-send connect message every 45 seconds or so for Websocket when it is already sending ping to keep socket alive through proxies etc. and detect failure.
The bayeux protocol as linked does not have a specification for web sockets only for long polling, the ping part is certainly additional to the base protocol too.So am I missing something? Is the timeout/reconnect a way of touching the session state in engine to prevent it being GCed? If so why can't simple empty ping message be used for that instead?
And what is the purpose of ping messages in this case given that logn-polling can't use them so you already must ensure timeout is less than any intermediate proxy/load balancer timeouts for long-polling to work?
The ping part I'm still confused about although I realise it's pretty trivial in practice and not a major performance concern, I just don't see why it was ever built...> I'm not sure what you mean here about long-polling not being able to use pings, partly because I don't know what you're referring to when you've been saying 'ping'. Can you clarify what you mean?To be clear I'm referring to the [] ping packets that server periodically sends client, controlled by the 'ping' option passed to server (or set to timeout/2).I assumed that this would only apply to websocket transport since long polls must be configured to be within proxy timeouts anyway and sending ping effectively just means you are shortening the poll length. That does appear to be the case with Faye - server sent pings only seem to happen for websocket and event source transports...I also initially assumed that the whole purpose of ping was to keep WebSockets alive through proxy idle timeouts and then wouldn't need any further idle communication which was the real root of my question above. The protocol fidelity issue answers that.So when I realised that WebSocket clients DO respect timeout and resend /meta/connect just as often as long-poll transports poll, I'm now confused why server ping was ever added for websockets? It doesn't appear to be part of bayeux protocol which only dealt with polling transports so needed no explicit keepalive mechanism. For a websocket you are already sending /meta/connect every timeout seconds and surely timeout must be set low enough to avoid idle connection killing proxies/load balancers already otherwise long polls just won't work.So given that in both cases you are already doing a full round trip every timeout seconds and that timeout must be lower than the idle timeout of your intermediate proxies (or at least sane ones or ones you control) then why bother with server sending ping at all?