Generate random 4bytes mask key
Get the IOState of the connection.
The policy that the connection is running under.
Get the websocket upgrade request.
Get the websocket upgrade response.
Register the connection close callback.
Register the exception callback.
Send binary message.
Send binary message.
Send text message.
A frame, and optional callback, intended for the network layer. <p> Note: the frame can undergo many transformations in the various layers and extensions present in the implementation. <p> If you are implementing a mutation, you are obliged to handle the incoming WriteCallback appropriately.