hs-libp2p-0.2.0.0: Haskell implementation of the libp2p networking stack
Safe HaskellNone
LanguageGHC2021

LibP2P.Transport

Description

Transport abstraction for libp2p.

Defines the record-of-functions pattern for transport-agnostic connection management. Stream transports produce a byte stream for the standard security/muxer upgrade; native multiplexed transports such as QUIC provide an already authenticated stream multiplexer.

Synopsis

Documentation

data ConnectionEndpoint Source #

The I/O endpoint established by a transport.

data NativeMuxer Source #

A transport-native authenticated stream multiplexer.

data RelayCircuitLimit Source #

Budget a relay advertised for one relayed circuit (specsrelaycircuit-v2).

A component of 0, or an absent component, means that component is unlimited. Nothing on a connection means it is not a relay circuit.

relayCircuitIsLimited :: Maybe RelayCircuitLimit -> Bool Source #

True when the relay imposed a non-zero duration or a non-zero per-direction data cap. A zero or omitted component does not count.

data RawConnection Source #

A connection established by a transport.

TCP and relayed connections carry an unencrypted byte stream. QUIC carries a TLS-authenticated native multiplexer and therefore bypasses Noise/Yamux.

data Listener Source #

A listener that accepts inbound connections.

Constructors

Listener 

data Transport Source #

Transport provides dial/listen capabilities for a specific protocol.