From RFC 9000:
On the receiving part of a stream, an application protocol can:
| Modifier and Type | Class and Description |
|---|---|
| public static enum | QuicReceiverStream.
An enum that models the state of the receiving part of a stream. |
| Modifier and Type | Method and Description |
|---|---|
| public QuicStreamReader | Returns: aQuicStreamReader to read data from this
stream.A sequential scheduler that will be invoked
when the reader is started and new data becomes available for reading scheduler)Connects an unstarted reader to the receiver end of this stream. |
| public long | Returns: the amount of data that has been received so farReturns the amount of data that has been received so far. |
| public void | disconnectReader(QuicStreamReader
the reader to be disconnected reader)Disconnect the reader, so that a new reader can be connected. |
| public default boolean | hasError()
Implements jdk. Returns true if the stream has errors. |
| public default boolean | |
| public long | Returns: the maximum amount of data that can be received on this streamReturns the maximum amount of data that can be received on this stream. |
| public long | Returns: the error code for this stream, or-1Returns the error code for this stream, or |
| public QuicReceiverStream. | Returns: the receiving state of the streamReturns the receiving state of the stream. |
| public void | requestStopSending(long
the application error code errorCode)Cancels the reading side of this stream by sending a STOP_SENDING frame. |
| connectReader | back to summary |
|---|---|
| public QuicStreamReader connectReader(SequentialScheduler scheduler) Connects an unstarted reader to the receiver end of this stream.
| |
| dataReceived | back to summary |
|---|---|
| public long dataReceived() Returns the amount of data that has been received so far. API Note This may include data that has not been read by the application yet, but does not count any data that may have been received twice.
| |
| disconnectReader | back to summary |
|---|---|
| public void disconnectReader(QuicStreamReader reader) Disconnect the reader, so that a new reader can be connected. API Note This can be useful for handing the stream over after having read or peeked at some bytes.
| |
| hasError | back to summary |
|---|---|
| public default boolean hasError() Implements jdk. Doc from jdk. Returns true if the stream has errors. For a bidirectional stream, this method returns true if either its sending part or its receiving part was closed with a non-zero error code.
| |
| isStopSendingRequested | back to summary |
|---|---|
| public default boolean isStopSendingRequested() | |
| maxStreamData | back to summary |
|---|---|
| public long maxStreamData() Returns the maximum amount of data that can be received on this stream. API Note This corresponds to the maximum amount of data that the peer has been allowed to send.
| |
| rcvErrorCode | back to summary |
|---|---|
| public long rcvErrorCode() Returns the error code for this stream, or
| |
| receivingState | back to summary |
|---|---|
| public QuicReceiverStream. Returns the receiving state of the stream.
| |
| requestStopSending | back to summary |
|---|---|
| public void requestStopSending(long errorCode) Cancels the reading side of this stream by sending a STOP_SENDING frame.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final QuicReceiverStream. | DATA_READ
The "Data Recvd" state persists until stream data has been delivered to the application. |
| public static final QuicReceiverStream. | DATA_RECVD
Once all data for the stream has been received, the receiving part enters the "Data Recvd" state. |
| public static final QuicReceiverStream. | RECV
The initial state for the receiving part of a stream is "Recv". |
| public static final QuicReceiverStream. | RESET_READ
Once the application receives the signal indicating that the stream was reset, the receiving part of the stream transitions to the "Reset Read" state, which is a terminal state. |
| public static final QuicReceiverStream. | RESET_RECVD
Receiving a RESET_STREAM frame in the "Recv" or "Size Known" state causes the stream to enter the "Reset Recvd" state. |
| public static final QuicReceiverStream. | SIZE_KNOWN
When a STREAM frame with a FIN bit is received, the final size of the stream is known; see Section 4.5. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this state indicates that the stream has been reset by the senderReturns true if this state indicates that the stream has been reset by the sender. |
| public boolean | isTerminal()
Implements jdk. Returns true if this is a terminal state. |
| public static QuicReceiverStream. | |
| public static QuicReceiverStream. |
| DATA_READ | back to summary |
|---|---|
| public static final QuicReceiverStream. The "Data Recvd" state persists until stream data has been delivered to the application. Once stream data has been delivered, the stream enters the "Data Read" state, which is a terminal state. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| DATA_RECVD | back to summary |
|---|---|
| public static final QuicReceiverStream. Once all data for the stream has been received, the receiving part enters the "Data Recvd" state. This might happen as a result of receiving the same STREAM frame that causes the transition to "Size Known". After all data has been received, any STREAM or STREAM_DATA_BLOCKED frames for the stream can be discarded. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| RECV | back to summary |
|---|---|
| public static final QuicReceiverStream. The initial state for the receiving part of a stream is "Recv". In the "Recv" state, the endpoint receives STREAM and STREAM_DATA_BLOCKED frames. Incoming data is buffered and can be reassembled into the correct order for delivery to the application. As data is consumed by the application and buffer space becomes available, the endpoint sends MAX_STREAM_DATA frames to allow the peer to send more data. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| RESET_READ | back to summary |
|---|---|
| public static final QuicReceiverStream. Once the application receives the signal indicating that the stream was reset, the receiving part of the stream transitions to the "Reset Read" state, which is a terminal state. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| RESET_RECVD | back to summary |
|---|---|
| public static final QuicReceiverStream. Receiving a RESET_STREAM frame in the "Recv" or "Size Known" state causes the stream to enter the "Reset Recvd" state. This might cause the delivery of stream data to the application to be interrupted. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| SIZE_KNOWN | back to summary |
|---|---|
| public static final QuicReceiverStream. When a STREAM frame with a FIN bit is received, the final size of the stream is known; see Section 4.5. The receiving part of the stream then enters the "Size Known" state. In this state, the endpoint no longer needs to send MAX_STREAM_DATA frames; it only receives any retransmissions of stream data. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| ReceivingStreamState | back to summary |
|---|---|
| private ReceivingStreamState() | |
| isReset | back to summary |
|---|---|
| public boolean isReset() Returns true if this state indicates that the stream has been reset by the sender.
| |
| isTerminal | back to summary |
|---|---|
| public boolean isTerminal() Implements jdk. Doc from jdk. Returns true if this is a terminal state.
| |
| valueOf | back to summary |
|---|---|
| public static QuicReceiverStream. | |
| values | back to summary |
|---|---|
| public static QuicReceiverStream. | |