final class Connection

internal  
 

Methods

__construct(ClientFactoryInterface $clientFactory, Endpoint $endpoint, float $connectTimeout, float $writeTimeout, array $settings = [], Closure|null $onRetired = null)

Create a reusable HTTP/2 connection slot.

void
start(Closure $requestFactory, StreamState $state, Deadline $deadline)

Start one HTTP/2 stream and route its response asynchronously.

void
write(StreamState $state, string $frame, bool $end, Deadline $deadline)

Write framed data to an accepted HTTP/2 stream.

bool
isAccepting()

Determine whether this connection can accept a new call.

bool
isClosed()

Determine whether this connection has terminated.

void
close()

Close the connection and fail every incomplete call.

Details

at line 63
__construct(ClientFactoryInterface $clientFactory, Endpoint $endpoint, float $connectTimeout, float $writeTimeout, array $settings = [], Closure|null $onRetired = null)

Create a reusable HTTP/2 connection slot.

Parameters

ClientFactoryInterface $clientFactory
Endpoint $endpoint
float $connectTimeout
float $writeTimeout
array $settings
Closure|null $onRetired

at line 78
void start(Closure $requestFactory, StreamState $state, Deadline $deadline)

Start one HTTP/2 stream and route its response asynchronously.

Parameters

Closure $requestFactory
StreamState $state
Deadline $deadline

Return Value

void

at line 244
void write(StreamState $state, string $frame, bool $end, Deadline $deadline)

Write framed data to an accepted HTTP/2 stream.

Parameters

StreamState $state
string $frame
bool $end
Deadline $deadline

Return Value

void

at line 337
bool isAccepting()

Determine whether this connection can accept a new call.

Return Value

bool

at line 345
bool isClosed()

Determine whether this connection has terminated.

Return Value

bool

at line 353
void close()

Close the connection and fail every incomplete call.

Return Value

void