Enum Class SendState

java.lang.Object
java.lang.Enum<SendState>
io.github.mahmoudimus.quic.connection.SendState
All Implemented Interfaces:
Serializable, Comparable<SendState>, Constable

public enum SendState extends Enum<SendState>
The states of the sending part of a stream (RFC 9000 section 3.1, figure 2).
   READY --first STREAM / STREAM_DATA_BLOCKED sent--> SEND --STREAM with FIN sent--> DATA_SENT
     |                                                 |                                |
     +----------------- reset by the application ------+--------------------------------+
                                    |                                                   |
                                    v                                       all data acknowledged
                               RESET_SENT --RESET_STREAM acknowledged--> RESET_RECVD   v
                                                                                  DATA_RECVD
 

The terminal states DATA_RECVD and RESET_RECVD are reached when the stream's send state is released: StreamsState then forgets the stream, after reporting StreamEvent.Finished for DATA_RECVD.

  • Enum Constant Details

    • READY

      public static final SendState READY
      Open, but no STREAM or STREAM_DATA_BLOCKED frame has been sent yet.
    • SEND

      public static final SendState SEND
      Sending data; the application may still write, or has finished but the FIN is unsent.
    • DATA_SENT

      public static final SendState DATA_SENT
      The FIN has been sent; only retransmissions remain.
    • DATA_RECVD

      public static final SendState DATA_RECVD
      Every byte and the FIN were acknowledged.
    • RESET_SENT

      public static final SendState RESET_SENT
      The application reset the stream and RESET_STREAM was queued.
    • RESET_RECVD

      public static final SendState RESET_RECVD
      The peer acknowledged RESET_STREAM.
  • Method Details

    • values

      public static SendState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SendState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null