Function redis_async::client::connect::connect[][src]

pub fn connect(
    addr: &SocketAddr
) -> impl Future<Item = RespConnection, Error = Error>

Connect to a Redis server and return a Future that resolves to a RespConnection for reading and writing asynchronously.

Each RespConnection implements both Sink and Stream and read and writes RESP objects.

This is a low-level interface to enable the creation of higher-level functionality.

The sink and stream sides behave independently of each other, it is the responsibility of the calling application to determine what results are paired to a particular command.

But since most Redis usages involve issue commands that result in one single result, this library also implements paired_connect.