class Connection

Properties

protected null|resource $stream

The subscriber stream.

protected bool $closed

Methods

__construct(string $host = '', int $port = 6379, float $timeout = 5.0, string|null $scheme = null, array $context = [])

Create a new Redis subscriber connection.

bool
send(string $data)

Send a complete command to Redis.

mixed
receive()

Receive and decode one RESP2 value.

void
close()

Close the Redis subscriber connection.

Details

at line 24
__construct(string $host = '', int $port = 6379, float $timeout = 5.0, string|null $scheme = null, array $context = [])

Create a new Redis subscriber connection.

Parameters

string $host
int $port
float $timeout
string|null $scheme
array $context

at line 62
bool send(string $data)

Send a complete command to Redis.

Parameters

string $data

Return Value

bool

at line 85
mixed receive()

Receive and decode one RESP2 value.

Return Value

mixed

at line 108
void close()

Close the Redis subscriber connection.

Return Value

void