From RFC 9000:
On the sending part of a stream, an application protocol can:
| Modifier and Type | Class and Description |
|---|---|
| public static enum | QuicSenderStream.
An enum that models the state of the sending part of a stream. |
| Modifier and Type | Method and Description |
|---|---|
| public QuicStreamWriter | Returns: aQuicStreamWriter to write data to this
stream.A sequential scheduler that will
push data on the returned writer. scheduler)Connects a writer to the sending end of this stream. |
| public long | Returns: the amount of data that has been sentReturns the amount of data that has been sent. |
| public void | disconnectWriter(QuicStreamWriter
the writer to be disconnected writer)Disconnect the writer, so that a new writer can be connected. |
| public default boolean | hasError()
Implements jdk. Returns true if the stream has errors. |
| public void | reset(long
the application error code errorCode)Abruptly closes the writing side of a stream by sending a RESET_STREAM frame. |
| public QuicSenderStream. | |
| public long | Returns: the error code for this stream, or-1Returns the error code for this stream, or |
| public boolean | Returns: true if STOP_SENDING was receivedReturns true if STOP_SENDING was received. |
| connectWriter | back to summary |
|---|---|
| public QuicStreamWriter connectWriter(SequentialScheduler scheduler) Connects a writer to the sending end of this stream.
| |
| dataSent | back to summary |
|---|---|
| public long dataSent() Returns the amount of data that has been sent. API Note This may include data that has not been acknowledged.
| |
| disconnectWriter | back to summary |
|---|---|
| public void disconnectWriter(QuicStreamWriter writer) Disconnect the writer, so that a new writer can be connected. API Note This can be useful for handing the stream over after having written 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.
| |
| reset | back to summary |
|---|---|
| public void reset(long errorCode) throws IOException Abruptly closes the writing side of a stream by sending a RESET_STREAM frame.
| |
| sendingState | back to summary |
|---|---|
| public QuicSenderStream. Returns the sending state of the stream.
| |
| sndErrorCode | back to summary |
|---|---|
| public long sndErrorCode() Returns the error code for this stream, or
| |
| stopSendingReceived | back to summary |
|---|---|
| public boolean stopSendingReceived() Returns true if STOP_SENDING was received.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final QuicSenderStream. | DATA_RECVD
Once all stream data has been successfully acknowledged, the sending part of the stream enters the "Data Recvd" state, which is a terminal state. |
| public static final QuicSenderStream. | DATA_SENT
After the application indicates that all stream data has been sent and a STREAM frame containing the FIN bit is sent, the sending part of the stream enters the "Data Sent" state. |
| public static final QuicSenderStream. | READY
The "Ready" state represents a newly created stream that is able to accept data from the application. |
| public static final QuicSenderStream. | RESET_RECVD
Once a packet containing a RESET_STREAM has been acknowledged, the sending part of the stream enters the "Reset Recvd" state, which is a terminal state. |
| public static final QuicSenderStream. | RESET_SENT
From any state that is one of "Ready", "Send", or "Data Sent", an application can signal that it wishes to abandon transmission of stream data. |
| public static final QuicSenderStream. | SEND
In the "Send" state, an endpoint transmits -- and retransmits as necessary -- stream data in STREAM frames. |
| 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 | |
| public boolean | isTerminal()
Implements jdk. Returns true if this is a terminal state. |
| public static QuicSenderStream. | |
| public static QuicSenderStream. |
| DATA_RECVD | back to summary |
|---|---|
| public static final QuicSenderStream. Once all stream data has been successfully acknowledged, the sending part of the stream enters the "Data Recvd" state, which is a terminal state. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| DATA_SENT | back to summary |
|---|---|
| public static final QuicSenderStream. After the application indicates that all stream data has been sent and a STREAM frame containing the FIN bit is sent, the sending part of the stream enters the "Data Sent" state. From this state, the endpoint only retransmits stream data as necessary. The endpoint does not need to check flow control limits or send STREAM_DATA_BLOCKED frames for a stream in this state. MAX_STREAM_DATA frames might be received until the peer receives the final stream offset. The endpoint can safely ignore any MAX_STREAM_DATA frames it receives from its peer for a stream in this state. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| READY | back to summary |
|---|---|
| public static final QuicSenderStream. The "Ready" state represents a newly created stream that is able to accept data from the application. Stream data might be buffered in this state in preparation for sending. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| RESET_RECVD | back to summary |
|---|---|
| public static final QuicSenderStream. Once a packet containing a RESET_STREAM has been acknowledged, the sending part of the stream enters the "Reset Recvd" state, which is a terminal state. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| RESET_SENT | back to summary |
|---|---|
| public static final QuicSenderStream. From any state that is one of "Ready", "Send", or "Data Sent", an application can signal that it wishes to abandon transmission of stream data. Alternatively, an endpoint might receive a STOP_SENDING frame from its peer. In either case, the endpoint sends a RESET_STREAM frame, which causes the stream to enter the "Reset Sent" state. [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| SEND | back to summary |
|---|---|
| public static final QuicSenderStream. In the "Send" state, an endpoint transmits -- and retransmits as necessary -- stream data in STREAM frames. The endpoint respects the flow control limits set by its peer and continues to accept and process MAX_STREAM_DATA frames. An endpoint in the "Send" state generates STREAM_DATA_BLOCKED frames if it is blocked from sending by stream flow control limits (Section 4.1). [RFC 9000, Section 3.1] (https://www.rfc-editor.org/rfc/rfc9000#name-sending-stream-states) | |
| SendingStreamState | back to summary |
|---|---|
| private SendingStreamState() | |
| isReset | back to summary |
|---|---|
| public boolean isReset() Returns true if this state indicates that the stream has been reset by the sender.
| |
| isSending | back to summary |
|---|---|
| public boolean isSending() Returns true if a stream in this state can be used for sending, that is,
if this state is either | |
| 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 QuicSenderStream. | |
| values | back to summary |
|---|---|
| public static QuicSenderStream. | |