class GrpcStreamedResponse extends IterableStreamedResponse implements HasTrailers

internal  
 

Carry a lazily produced protocol-owned gRPC stream to the HTTP/2 bridge.

Properties

protected bool $cancelOnDisconnect from  IterableStreamedResponse

Methods

__construct(iterable $chunks, array $headers, array $trailerNames, Closure $resolveTrailers)

No description

cancelOnDisconnect(bool $cancel = true)

Cancel response production when the client connection closes.

bool
shouldCancelOnDisconnect()

Determine whether disconnects should cancel response production.

setChunks(iterable $chunks)

Set the chunks associated with the response.

setCallback(callable $callback)

Set the callback associated with the response.

bool
streamTo(Closure $write)

Stream retained chunks through the given writer.

setContent(string|null $content)

Set the response content.

array
trailerNames()

Get the trailer names known before response emission.

array
trailers()

Get the final response trailers.

void
completeUsing(Closure $completion)

Register cleanup for the call that owns this response.

void
complete()

Complete the call that owns this response.

bool
protocolStateIsIntact()

Determine whether middleware preserved the protocol-owned response state.

Details

at line 35
__construct(iterable $chunks, array $headers, array $trailerNames, Closure $resolveTrailers)

No description

Parameters

iterable $chunks
array $headers
array $trailerNames
Closure $resolveTrailers

IterableStreamedResponse cancelOnDisconnect(bool $cancel = true)

Cancel response production when the client connection closes.

Parameters

bool $cancel

Return Value

IterableStreamedResponse

bool shouldCancelOnDisconnect()

Determine whether disconnects should cancel response production.

Return Value

bool

at line 55
IterableStreamedResponse setChunks(iterable $chunks)

Set the chunks associated with the response.

Parameters

iterable $chunks

Return Value

IterableStreamedResponse

at line 68
IterableStreamedResponse setCallback(callable $callback)

Set the callback associated with the response.

Parameters

callable $callback

Return Value

IterableStreamedResponse

IterableStreamedResponse sendContent()

Send the response content.

bool streamTo(Closure $write)

internal  
 

Stream retained chunks through the given writer.

Parameters

Closure $write

Return Value

bool

at line 81
GrpcStreamedResponse setContent(string|null $content)

Set the response content.

Parameters

string|null $content

Return Value

GrpcStreamedResponse

at line 94
array trailerNames()

Get the trailer names known before response emission.

Return Value

array

at line 104
array trailers()

Get the final response trailers.

Return Value

array

at line 114
void completeUsing(Closure $completion)

internal  
 

Register cleanup for the call that owns this response.

Parameters

Closure $completion

Return Value

void

at line 124
void complete()

internal  
 

Complete the call that owns this response.

Return Value

void

at line 137
bool protocolStateIsIntact()

internal  
 

Determine whether middleware preserved the protocol-owned response state.

Return Value

bool