connectToWebSocket method

WebSocketChannel connectToWebSocket(
  1. String url, {
  2. required String authToken,
})

Implementation

WebSocketChannel connectToWebSocket(String url, {required String authToken}) {
  WebSocketChannel webSocketChannel = IOWebSocketChannel.connect(url);
  _sendConnectRequest(webSocketChannel);
  _sendLoginRequest(
    webSocketChannel,
    authToken: authToken,
  );
  return webSocketChannel;
}