faye/faye — pull request #305 by suprememoocow (2014-06-01 21:35:51+00:00)
Title: Reset the Faye connection

Sometimes the client just knows that the Faye connection is no longer valid. For example, on Gitter we detect when the client computer has just awoken from sleep. If the client computer has been sleeping for several minutes or more, the best thing to do is to renegotiate the connection from the handshake onwards. This saves network round trips and allows the client to reconnect much faster than if it assumes that it's `socketId` is still valid. This PR allows the client to instruct the Faye client to do just that.

Any existing subscriptions will be maintained through to the new connection.

ps: I'm definitely not sold on the name `reset` for the method, if you've got a better suggestion, I would definitely be up for it.