connect abstract method

Future<void> connect({
  1. String? host,
  2. int? port,
  3. String? username,
  4. String? password,
})

Connects to the Valkey server.

If host, port, username, or password are provided, they will override the default values set in the constructor.

Throws a ValkeyConnectionException if the socket connection fails (e.g., connection refused) or if authentication fails (e.g., wrong password).

Implementation

Future<void> connect({
  String? host,
  int? port,
  String? username,
  String? password,
});