Skip to content

Commit 10dd621

Browse files
committed
address review comments
1 parent e59af60 commit 10dd621

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/transport/transport.jl

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
"""
2-
Transport module for Redis.jl abstractes the connection to the Redis server.
3-
4-
Each transportimplementation must provide the following methods:
5-
- `read_line(t::RedisTransport)`: read one line from the transport, similar to `readline`
6-
- `read_nbytes(t::RedisTransport, m::Int)`: read `m` bytes from the transport, similar to `read`
7-
- `write_bytes(t::RedisTransport, b::Vector{UInt8})`: write bytes to the transport, similar to `write`
8-
- `close(t::RedisTransport)`
9-
- `is_connected(t::RedisTransport)`: whether the transport is connected or not
10-
- `status(t::RedisTransport)`: status of the transport, whether it is connected or not
11-
- `set_props!(t::RedisTransport)`: set any properties required. For example, disable nagle and enable quickack to speed up the usually small exchanges
12-
- `get_sslconfig(t::RedisTransport)`: get the SSL configuration for the transport if applicable
13-
- `io_lock(f, t::RedisTransport)`: lock the transport for IO operations
2+
Transport module for Redis.jl abstracts the connection to the Redis server.
3+
4+
Each transport implementation must provide the following methods:
5+
- `read_line(t::RedisTransport)`: Read one line from the transport, similar to `readline`. Return a `String`.
6+
- `read_nbytes(t::RedisTransport, m::Int)`: Read `m` bytes from the transport, similar to `read`. Return a `Vector{UInt8}`.
7+
- `write_bytes(t::RedisTransport, b::Vector{UInt8})`: Write bytes to the transport, similar to `write`. Return the number of bytes written.
8+
- `close(t::RedisTransport)`: Close the transport. Return `nothing`.
9+
- `is_connected(t::RedisTransport)`: Whether the transport is connected or not. Return a boolean.
10+
- `set_props!(t::RedisTransport)`: Set any properties required. For example, disable nagle and enable quickack to speed up the usually small exchanges. Return `nothing`.
11+
- `get_sslconfig(t::RedisTransport)`: Get the SSL configuration for the transport if applicable. Return a `MbedTLS.SSLConfig` or `nothing`.
12+
- `io_lock(f, t::RedisTransport)`: Lock the transport for IO operations and execute `f`. Return the result of `f`.
1413
1514
"""
1615
module Transport

0 commit comments

Comments
 (0)