Instead of emitting a wserror event (WebSocket? whichServer?), emit a
standard error event. Inspect the provided Error object if it's important
to know which condition caused the error.
Add a fail-safe timeout in case the WebSocket doesn't emit a wserror
event, and we also haven't heard from the server in a couple of minutes.
This can happen in cases where a malfunctioning or misconfigured
application-aware proxy/firewall sits between the client and server.
Emit an "error" event only for the case where we have an invalid roomid.
All types of error that might be considered a connection error emit
a "disconnected" event, instead. If there are no listeners for this
event an error will be throw.
Document the "error" and "disconnected" events.
Adjust example to reflect event name change
If there are no listeners for the "disconnected" event, emit an "error"
event instead of throwing an error. Per discussion with @alaingilbert.
Compiled source
Merge pull request #228 from alaingilbert/disconnect

Improved handling of unexpected disconnects