Class QuicConnectionCloseEvent
java.lang.Object
io.netty.handler.codec.quic.QuicConnectionCloseEvent
- All Implemented Interfaces:
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
Modifier and TypeMethodDescriptioninterror()Return the error that was provided for the close.static intextractTlsError(int error) Extract the containedTLS errorfrom theQUIC error.booleanReturntrueif this was an application close,falseotherwise.booleanReturnstrueif 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.toString()
-
Method Details
-
isApplicationClose
public boolean isApplicationClose()Returntrueif this was an application close,falseotherwise.- 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()Returnstrueif a TLS error is contained.- Returns:
trueif this is anTLS error,falseotherwise.
-
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
-
extractTlsError
public static int extractTlsError(int error) Extract the containedTLS errorfrom theQUIC error. If the givenQUIC errordoes not contain aTLS errorit will return-1.- Parameters:
error- theQUIC error- Returns:
- the
TLS erroror-1if there was noTLS errorcontained.
-