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.
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.
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 74
__construct(Deadline $deadline, int $maxReceiveMessageSize, int $maxMetadataSize, int $maxBufferedMessages, int $maxBufferedBytes)
No description
at line 87
void
attachStream(int $streamId)
Attach the native stream identifier.
at line 99
int|null
streamId()
Return the native stream identifier.
at line 109
void
onAbandon(Closure $callback)
Register the connection abandonment callback.
at line 117
void
handle(ResponseInterface $response)
Apply one incremental HTTP/2 response event.
at line 193
void
fail(Throwable $failure, bool $abandon = false)
Mark a transport or protocol failure.
at line 219
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 242
bool
expireIfNeeded()
Expire the call when its monotonic deadline has elapsed.
at line 259
void
failWithStatus(Status $status)
Mark a local protocol status and abandon the native stream.
at line 280
Metadata
metadata()
Wait for and return initial response metadata.
at line 290
Metadata
trailers()
Wait for and return final trailing metadata.
at line 300
Status
status()
Wait for and return the final gRPC status.
at line 310
string|null
nextMessage()
Wait for and remove the next serialized response message.
at line 327
bool
committed()
Determine whether response headers or a message committed the attempt.
at line 335
bool
trailersOnly()
Determine whether the final response was trailers-only.
at line 343
bool
isAbandoned()
Determine whether the call has locally abandoned its native stream.
at line 351
bool
isComplete()
Determine whether the state has a final status or failure.
at line 359
bool
hasRetryPushback()
Determine whether retry pushback was present.
at line 369
string|array|null
retryPushback()
Return the raw retry-pushback value.
at line 377
int
bufferedMessageCount()
Return the number of buffered response messages.
at line 385
int
bufferedBytes()
Return the buffered response payload bytes.