Package io.github.mahmoudimus.http3
Class Http3StreamValidator.UnidirectionalStreams
java.lang.Object
io.github.mahmoudimus.http3.Http3StreamValidator.UnidirectionalStreams
- Enclosing class:
Http3StreamValidator
The peer's unidirectional streams (RFC 9114 §6.2, RFC 9204 §4.2): at most one control
stream, one QPACK encoder stream and one QPACK decoder stream, and push streams only from a
server. Not thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionTracks the peer's unidirectional streams. -
Method Summary
Modifier and TypeMethodDescriptionbooleanonStream(long type) Checks a new stream of the given type.voidonStreamClosed(long type) Reports that a stream of this type ended or was reset.
-
Constructor Details
-
UnidirectionalStreams
Tracks the peer's unidirectional streams.- Parameters:
local- which end this endpoint is
-
-
Method Details
-
onStream
Checks a new stream of the given type.- Parameters:
type- the stream type- Returns:
- true if the stream is to be read; false for an unknown or reserved type, whose stream the caller abandons (reading stopped with H3_STREAM_CREATION_ERROR) or discards
- Throws:
Http3Exception- a connection error H3_STREAM_CREATION_ERROR for a second control, encoder or decoder stream, or a push stream opened by a client
-
onStreamClosed
Reports that a stream of this type ended or was reset.- Parameters:
type- the stream type- Throws:
Http3Exception- a connection error H3_CLOSED_CRITICAL_STREAM for a control, encoder or decoder stream
-