connect static method
Establish connection to Redis server and send SELECT command
Implementation
static Future<RedisClient> connect(
String host,
int port, {
required int db,
}) async {
final rpc =
await RedisProtocolClient.createConnection(host: host, port: port);
rpc.sendCommand(Resp(['SELECT', '$db']));
final res = await rpc.receive();
res.throwIfError();
return RedisClient._(rpc);
}