connect method

Future<IOWebSocketChannel> connect(
  1. String site,
  2. {String ip = '127.0.0.1',
  3. String port = '43110',
  4. bool override = false}
)

Implementation

Future<IOWebSocketChannel> connect(
  String site, {
  String ip = '127.0.0.1',
  String port = '43110',
  bool override = false,
}) async {
  final wrapperKey = await instance.getWrapperKey(
    'http://$ip:$port/$site',
    override: override,
  );
  if (override)
    channel = IOWebSocketChannel.connect(
      'ws://$ip:$port/Websocket?wrapper_key=$wrapperKey',
    );
  else
    channel ??= IOWebSocketChannel.connect(
      'ws://$ip:$port/Websocket?wrapper_key=$wrapperKey',
    );
  return channel;
}