Enum iroh_bytes::protocol::Closed
source · #[repr(u16)]pub enum Closed {
StreamDropped,
ProviderTerminating,
RequestReceived,
}Expand description
Reasons to close connections or stop streams.
A QUIC connection can be closed and a stream can request the other side to
stop sending data. Both closing and stopping have an associated error_code, closing
also adds a reason as some arbitrary bytes.
This enum exists so we have a single namespace for error_codes used.
Variants§
StreamDropped
The quinn::RecvStream was dropped.
Used implicitly when a quinn::RecvStream is dropped without explicit call to
quinn::RecvStream::stop. We don’t use this explicitly but this is here as
documentation as to what happened to 0.
ProviderTerminating
The provider is terminating.
When a provider terminates all connections and associated streams are closed.
RequestReceived
The provider has received the request.
Only a single request is allowed on a stream, if more data is received after this a provider may send this error code in a STOP_STREAM frame.