IoWebSocketSession constructor
A session over the open socket, whose address is uri. It does
not bound what waits to be sent (dart:io keeps it all), nor the
size of the messages it receives, and it has dart:io's fault with
a ping or pong between the fragments of a message: the fragments
before it are lost, and the pong carries them (see
IoWebSocketSession.fromUpgradedSocket).
The session listens to socket at once (reading nothing until
messages is listened to), so do not listen to socket yourself.
Implementation
IoWebSocketSession(io.WebSocket socket, this.uri)
: _socket = socket,
_guard = null {
_receive();
}