onWsOpened method

  1. @override
void onWsOpened(
  1. WebSocketConnection webSocketConnection
)
override

Invoked when a web socket has been accepted by the remote peer and may begin transmitting messages. Only after this method is invoked, client is able to send/receive ws messages. Returned WebSocketConnection can be used to send text/byte messages to server as long as connection is still active (unless onWsClosing or onWsClosed are called)

Implementation

@override
void onWsOpened(WebSocketConnection webSocketConnection) {
  _onWsOpen(webSocketConnection);
}