interface ClientInterface

Methods

int
send(RequestInterface $request, float|null $timeout = null)

Send an HTTP/2 request.

recv(float $timeout = 0)

Receive a response.

void
write(int $streamId, string $data, bool $end = false, float|null $timeout = null)

Write data to a stream.

void
close()

Close the client.

bool
isConnected()

Determine whether the client is connected.

bool
isStreamOpen(int $streamId)

Determine whether the stream remains open.

Details

at line 14
int send(RequestInterface $request, float|null $timeout = null)

Send an HTTP/2 request.

Parameters

RequestInterface $request
float|null $timeout

Return Value

int

Stream identifier

at line 19
ResponseInterface|null recv(float $timeout = 0)

Receive a response.

Parameters

float $timeout

Return Value

ResponseInterface|null

at line 24
void write(int $streamId, string $data, bool $end = false, float|null $timeout = null)

Write data to a stream.

Parameters

int $streamId
string $data
bool $end
float|null $timeout

Return Value

void

at line 34
void close()

Close the client.

Return Value

void

at line 39
bool isConnected()

Determine whether the client is connected.

Return Value

bool

at line 44
bool isStreamOpen(int $streamId)

Determine whether the stream remains open.

Parameters

int $streamId

Return Value

bool