Called when a binary message is received.
Called when a CLOSE message is received. Note that this is called before the socket is necessarily guaranteed to be closed.
Called when a websocket connection is closed.
Called when a new websocket connection is established.
Called when a text message is received.
An abstract class that you should extend to define logic for handling websocket messages and events. Create a new class that inherits from this one, and overrides any "on..." methods that you'd like.