Connection
class Connection
Redis connection.
Properties
protected resource | $connection | Connection. | |
protected string|null | $name | Connection name. | |
protected bool | $isPersistent | Is the connection persistent? | |
protected int | $connectionTimeout | Connection timeout. | |
protected int | $readWriteTimeout | Read/write timeout. | |
protected bool | $tcpNodelay | TCP nodelay. |
Methods
__construct(string $host, int $port = 6379, array $options = [])
Constructor.
__destruct()
Destructor.
array
getOptions()
Returns the connection options.
resource
createConnection(string $host, int $port)
Creates a connection to the server.
string
appendReadErrorReason(string $message)
Appends the read error reason to the error message if possible.
string
readLine()
Gets line from the server.
string
read(int $bytes)
Reads n bytes from the server.
int
write(string $data)
Writes data to the server.
Details
at line 83
__construct(string $host, int $port = 6379, array $options = [])
Constructor.
at line 105
__destruct()
Destructor.
at line 118
array
getOptions()
Returns the connection options.
at line 137
protected resource
createConnection(string $host, int $port)
Creates a connection to the server.
at line 168
protected string
appendReadErrorReason(string $message)
Appends the read error reason to the error message if possible.
at line 183
string
readLine()
Gets line from the server.
at line 201
string
read(int $bytes)
Reads n bytes from the server.
at line 231
int
write(string $data)
Writes data to the server.