Class QuicConnectionCloseEvent

java.lang.Object
io.netty.handler.codec.quic.QuicConnectionCloseEvent
All Implemented Interfaces:
QuicEvent

public final class QuicConnectionCloseEvent extends Object implements QuicEvent
Event that is generated if the remote peer sends a CLOSE_CONNECTION frame. This allows to inspect the various details of the cause of the close.
  • Method Details

    • isApplicationClose

      public boolean isApplicationClose()
      Return true if this was an application close, false otherwise.
      Returns:
      if this is an application close.
    • error

      public int error()
      Return the error that was provided for the close.
      Returns:
      the error.
    • isTlsError

      public boolean isTlsError()
      Returns true if a TLS error is contained.
      Returns:
      true if this is an TLS error, false otherwise.
    • reason

      public byte[] reason()
      Returns the reason for the close, which may be empty if no reason was given as part of the close.
      Returns:
      the reason.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • extractTlsError

      public static int extractTlsError(int error)
      Extract the contained TLS error from the QUIC error. If the given QUIC error does not contain a TLS error it will return -1.
      Parameters:
      error - the QUIC error
      Returns:
      the TLS error or -1 if there was no TLS error contained.