connectSocket function

Future<RespServerConnection> connectSocket(
  1. String host, {
  2. int port = 6379,
  3. Duration? timeout,
})

Creates a server connection using a socket.

Implementation

Future<RespServerConnection> connectSocket(String host, {int port = 6379, Duration? timeout}) async {
  final socket = await Socket.connect(host, port, timeout: timeout);
  return _SocketRespServer(socket);
}