Class QuicHeaderParser

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public final class QuicHeaderParser
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Parses the QUIC packet header and notifies a callback once parsing was successful.

    Once the parser is not needed anymore the user needs to call close() to ensure all resources are released. Failed to do so may lead to memory leaks.

    This class can be used for advanced use-cases. Usually you want to just use QuicClientCodecBuilder or QuicServerCodecBuilder.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  QuicHeaderParser.QuicHeaderProcessor
      Called when a QUIC packet and its header could be parsed.
    • Constructor Summary

      Constructors 
      Constructor Description
      QuicHeaderParser​(int localConnectionIdLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void parse​(java.net.InetSocketAddress sender, java.net.InetSocketAddress recipient, ByteBuf packet, QuicHeaderParser.QuicHeaderProcessor callback)
      Parses a QUIC packet and extract the header values out of it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QuicHeaderParser

        public QuicHeaderParser​(int localConnectionIdLength)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable