primus/primus — pull request #156 by lpinca (2014-02-14 16:20:40+00:00)
Title: Add ability to trigger a client-side reconnection from the server

As discussed on IRC i don't know why [primus.js#L675-L677](this https://github.com/primus/primus/blob/master/primus.js#L675-L677) was added. I think that the reason was to prevent an unwanted reconnection as calling `socket.disconnect()` caused the client to trigger a reconnection. But now this should be correctly handled by sending `primus::server::close` to the client.

We have the following cases:

1. We don't want to reconnect and the connection is killed intentionally. In this case we send `primus::server::close` which is handled by the client protocol parser and the reconnection is not attempted.

2. The connection is closed unintentionally (or intentionally but we want to reconnect). In this case a reconnection is attempted (if reconnection is enabled).