StreamState
final class StreamState
| internal |
Methods
No description
Attach the native stream identifier.
Return the native stream identifier.
Discard an untrusted response and replace it with a terminal failure.
Expire the call when its monotonic deadline has elapsed.
Return the final status without waiting.
Return the final transport or protocol failure without waiting.
Wait for and remove the next serialized response message.
Determine whether response headers or a message committed the attempt.
Determine whether the final response was trailers-only.
Determine whether the call has locally abandoned its native stream.
Determine whether the state has a final status or failure.
Release an incomplete native stream without publishing a result.
Determine whether retry pushback was present.
Return the raw retry-pushback value.
Return the number of buffered response messages.
Return the buffered response payload bytes.
Details
at line 75
__construct(Deadline $deadline, int $maxReceiveMessageSize, int $maxMetadataSize, int $maxBufferedMessages, int $maxBufferedBytes)
No description
at line 88
void
attachStream(int $streamId)
Attach the native stream identifier.
at line 100
int|null
streamId()
Return the native stream identifier.
at line 110
void
onAbandon(Closure $callback)
Register the connection abandonment callback.
at line 118
void
handle(ResponseInterface $response)
Apply one incremental HTTP/2 response event.
at line 194
void
fail(Throwable $failure, bool $abandon = false)
Mark a transport or protocol failure.
at line 220
void
discardAndFail(Throwable $failure)
| internal |
Discard an untrusted response and replace it with a terminal failure.
This is only valid while terminating a connection whose pending stream was attached to a different identifier than the native send operation returned.
at line 243
bool
expireIfNeeded()
Expire the call when its monotonic deadline has elapsed.
at line 260
void
failWithStatus(Status $status)
Mark a local protocol status and abandon the native stream.
at line 281
Metadata
metadata()
Wait for and return initial response metadata.
at line 291
Metadata
trailers()
Wait for and return final trailing metadata.
at line 301
Status
status()
Wait for and return the final gRPC status.
at line 311
Status|null
finalStatus()
Return the final status without waiting.
at line 319
Throwable|null
finalFailure()
Return the final transport or protocol failure without waiting.
at line 327
string|null
nextMessage()
Wait for and remove the next serialized response message.
at line 344
bool
committed()
Determine whether response headers or a message committed the attempt.
at line 352
bool
trailersOnly()
Determine whether the final response was trailers-only.
at line 360
bool
isAbandoned()
Determine whether the call has locally abandoned its native stream.
at line 368
bool
isComplete()
Determine whether the state has a final status or failure.
at line 376
void
abandonIfIncomplete()
Release an incomplete native stream without publishing a result.
at line 389
bool
hasRetryPushback()
Determine whether retry pushback was present.
at line 399
string|array|null
retryPushback()
Return the raw retry-pushback value.
at line 407
int
bufferedMessageCount()
Return the number of buffered response messages.
at line 415
int
bufferedBytes()
Return the buffered response payload bytes.