Class CompressedQuicTripTransport

All Implemented Interfaces:
Transport

@TransportService("tripcq") public class CompressedQuicTripTransport extends QuicTripTransport
Transport implementation for QUIC with compression, scheme "tripcq".
Inserts the deflate compression streams between TRIP and every QUIC stream, on the server and on the client.
  • Field Details

  • Constructor Details

    • CompressedQuicTripTransport

      public CompressedQuicTripTransport(URI uri)
      Creates a new compressed QUIC transport.
      Parameters:
      uri - the URI of the transport
  • Method Details

    • createConnectionHandler

      public Runnable createConnectionHandler(String connectionName, InputStream inputStream, OutputStream outputStream, Supplier<List<X509Certificate>> peerCertificates)
      Description copied from interface: Transport
      Creates a connection handler for the given streams and the certificates the peer presented.

      The certificates are those the TLS layer of the transport has verified, i.e. the client certificate chain of a mutually authenticated connection. They are provided lazily, since the TLS handshake of a TCP connection takes place on the first read, which is done by the handler. The handler asks for them only after it has received the connection request, when the handshake is complete. See TransportClientInfo.peerCertificates().

      Specified by:
      createConnectionHandler in interface Transport
      Overrides:
      createConnectionHandler in class AbstractTransport
      Parameters:
      connectionName - the name of the connection
      inputStream - the input stream
      outputStream - the output stream
      peerCertificates - supplies the verified certificate chain of the peer, leaf first, empty if none
      Returns:
      the connection handler
    • createStream

      public TripStream createStream(Dictionary dictionary, tech.kwik.core.QuicStream quicStream)
      Description copied from class: QuicTripTransport
      Creates a TRIP stream for the given QUIC stream.
      Overrides:
      createStream in class QuicTripTransport
      Parameters:
      dictionary - the dictionary to use for serialization/deserialization
      quicStream - the QUIC stream
      Returns:
      the TRIP stream
    • createCompressedOutputStream

      protected OutputStream createCompressedOutputStream(OutputStream outputStream)
      Creates the compressed output stream.
      Parameters:
      outputStream - the uncompressed output stream of the QUIC stream
      Returns:
      the compressed output stream
    • createCompressedInputStream

      protected InputStream createCompressedInputStream(InputStream inputStream)
      Creates the compressed input stream.
      Parameters:
      inputStream - the uncompressed input stream of the QUIC stream
      Returns:
      the compressed input stream