Class QuicProtocolConnection
java.lang.Object
org.tentackle.quic.QuicProtocolConnection
- All Implemented Interfaces:
tech.kwik.core.server.ApplicationProtocolConnection
public class QuicProtocolConnection
extends Object
implements tech.kwik.core.server.ApplicationProtocolConnection
The server side of a QUIC connection.
Dispatches each stream a client opens to a TRIP connection handler running on a virtual thread.
Dispatches each stream a client opens to a TRIP connection handler running on a virtual thread.
-
Constructor Summary
ConstructorsConstructorDescriptionQuicProtocolConnection(QuicTripTransport transport) Creates a protocol connection for an unknown peer.QuicProtocolConnection(QuicTripTransport transport, InetSocketAddress peer) Creates a protocol connection without a guard.QuicProtocolConnection(QuicTripTransport transport, InetSocketAddress peer, MultiplexedConnectionGuard guard, boolean refused) Creates a protocol connection. -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptPeerInitiatedStream(tech.kwik.core.QuicStream quicStream) protected StringgetConnectionName(tech.kwik.core.QuicStream quicStream) Gets the name of a stream's TRIP connection.
Same format as the one of quiche:"stream <id> of QUIC connection to /<ip>:<port>", so thatTransportClientInfo.getHost(String)finds the host.
-
Constructor Details
-
QuicProtocolConnection
public QuicProtocolConnection(QuicTripTransport transport, InetSocketAddress peer, MultiplexedConnectionGuard guard, boolean refused) Creates a protocol connection.The peer's address names each stream's connection, which is what the
PreAuthenticationPolicygroups the connection limits by. KWIK's stream names carry only the stream number.- Parameters:
transport- the transport the streams belong topeer- the client's address, null if unknownguard- the guard of the QUIC connection, null if nonerefused- true if the pre-authentication policy refused the QUIC connection: its streams are closed at once
-
QuicProtocolConnection
Creates a protocol connection without a guard.- Parameters:
transport- the transport the streams belong topeer- the client's address, null if unknown
-
QuicProtocolConnection
Creates a protocol connection for an unknown peer.- Parameters:
transport- the transport the streams belong to
-
-
Method Details
-
getConnectionName
Gets the name of a stream's TRIP connection.
Same format as the one of quiche:"stream <id> of QUIC connection to /<ip>:<port>", so thatTransportClientInfo.getHost(String)finds the host.- Parameters:
quicStream- the stream- Returns:
- the connection name
-
acceptPeerInitiatedStream
public void acceptPeerInitiatedStream(tech.kwik.core.QuicStream quicStream) - Specified by:
acceptPeerInitiatedStreamin interfacetech.kwik.core.server.ApplicationProtocolConnection
-