| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
LibP2P.Transport.WebTransport.HTTP3
Description
Minimal HTTP/3 WebTransport session layer for libp2p.
This implements only the protocol surface required by the libp2p WebTransport specification: HTTP/3 SETTINGS, one Extended CONNECT request, and bidirectional WebTransport streams. QPACK is restricted to a zero-sized dynamic table, keeping all header blocks self-contained.
Synopsis
- data WebTransportSession
- connectWebTransport :: Connection -> ByteString -> IO WebTransportSession
- acceptWebTransport :: Connection -> IO WebTransportSession
- openWebTransportStream :: WebTransportSession -> IO Stream
- acceptWebTransportStream :: WebTransportSession -> IO Stream
- closeWebTransportSession :: WebTransportSession -> IO ()
Documentation
data WebTransportSession Source #
connectWebTransport :: Connection -> ByteString -> IO WebTransportSession Source #
Establish a client WebTransport session over an authenticated QUIC connection using the standardized libp2p endpoint.
acceptWebTransport :: Connection -> IO WebTransportSession Source #
Accept the single libp2p WebTransport Extended CONNECT request on a QUIC connection and send a successful response.
openWebTransportStream :: WebTransportSession -> IO Stream Source #
Open a bidirectional stream in this WebTransport session.
acceptWebTransportStream :: WebTransportSession -> IO Stream Source #
Accept the next bidirectional stream belonging to this session.
closeWebTransportSession :: WebTransportSession -> IO () Source #
Close the HTTP/3 control request and stop dispatching streams.