Package io.netty.handler.codec.quic
Class QuicConnectionCloseEvent
- java.lang.Object
-
- io.netty.handler.codec.quic.QuicConnectionCloseEvent
-
- All Implemented Interfaces:
QuicEvent
public final class QuicConnectionCloseEvent extends java.lang.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
error()
Return the error that was provided for the close.static int
extractTlsError(int error)
Extract the containedTLS error
from theQUIC error
.boolean
isApplicationClose()
Returntrue
if this was an application close,false
otherwise.boolean
isTlsError()
Returnstrue
if a TLS error is contained.byte[]
reason()
Returns the reason for the close, which may be empty if no reason was given as part of the close.java.lang.String
toString()
-
-
-
Method Detail
-
isApplicationClose
public boolean isApplicationClose()
Returntrue
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()
Returnstrue
if a TLS error is contained.- Returns:
true
if this is anTLS 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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
extractTlsError
public static int extractTlsError(int error)
Extract the containedTLS error
from theQUIC error
. If the givenQUIC error
does not contain aTLS error
it will return-1
.- Parameters:
error
- theQUIC error
- Returns:
- the
TLS error
or-1
if there was noTLS error
contained.
-
-