class ResponseCancellation

internal  
 

Track only active response producers, so disconnects cannot cancel later request work.

Properties

static protected array<int, array<int, self>> $responses

Methods

static ResponseCancellation|null
register(int $connection)

Register the current coroutine for the duration of response production.

static void
cancel(int $connection)

Cancel every active producer on a closed connection.

void
release()

Remove this registration without disturbing a newer response.

static void
flushState()

Flush all static state.

Details

at line 31
static ResponseCancellation|null register(int $connection)

Register the current coroutine for the duration of response production.

Parameters

int $connection

Return Value

ResponseCancellation|null

at line 45
static void cancel(int $connection)

Cancel every active producer on a closed connection.

Parameters

int $connection

Return Value

void

at line 58
void release()

Remove this registration without disturbing a newer response.

Return Value

void

at line 74
static void flushState()

Flush all static state.

Return Value

void