connect static method

Future<OpenRGBClient> connect({
  1. String host = '127.0.0.1',
  2. int port = 6742,
  3. String? clientName,
})

First function to call to connect to the server.

Implementation

static Future<OpenRGBClient> connect({
  String host = '127.0.0.1',
  int port = 6742,
  String? clientName,
}) async {
  final socket = await Socket.connect(host, port);
  final client = OpenRGBClient._(socket);
  await client._doHandshake(clientName);
  return client;
}