Module endpoint

Module endpoint 

Source
Expand description

The Endpoint allows establishing connections to other iroh endpoints.

The Endpoint is the main API interface to manage a local iroh endpoint. It allows connecting to and accepting connections from other endpoints. See the module docs for more details on how iroh connections work.

The main items in this module are:

Modules§

presets
Presets allow configuring an endpoint quickly with a chosen set of defaults.

Structs§

Accept
Future produced by Endpoint::accept.
AcceptBi
quinn types that are used in the public iroh API. Future produced by [Connection::accept_bi]
AcceptUni
quinn types that are used in the public iroh API. Future produced by [Connection::accept_uni]
Accepting
In-progress connection attempt future
AckFrequencyConfig
quinn types that are used in the public iroh API. Parameters for controlling the peer’s acknowledgement frequency
ApplicationClose
quinn_proto types that are used in the public iroh API. Reason given by an application for closing the connection
BindOptsNon-wasm_browser
Options when configuring binding an IP socket.
Builder
Builder for Endpoint.
Chunk
quinn_proto types that are used in the public iroh API. A chunk of data from the receive stream
ClosedStream
quinn types that are used in the public iroh API. Error indicating that a stream has not been opened or has already been finished or reset
ConnectOptions
Options for the Endpoint::connect_with_opts function.
Connecting
An outgoing connection in progress.
Connection
A QUIC connection.
ConnectionClose
quinn_proto types that are used in the public iroh API. Reason given by the transport for closing the connection
ConnectionInfo
Information about a connection.
ConnectionStats
quinn types that are used in the public iroh API. Connection statistics
ControllerMetrics
quinn_proto types that are used in the public iroh API. Common congestion controller metrics
CryptoError
quinn_proto types that are used in the public iroh API. Generic crypto errors
DirectAddr
A direct address on which an iroh-endpoint might be contactable.
Endpoint
Controls an iroh endpoint, establishing connections with other endpoints.
ExportKeyingMaterialError
quinn_proto types that are used in the public iroh API. Error returned by [Session::export_keying_material].
FrameStats
quinn_proto types that are used in the public iroh API. Number of frames transmitted or received of each frame type
HandshakeCompleted
Marker type for a connection that has completed the handshake.
IdleTimeout
quinn types that are used in the public iroh API. Maximum duration of inactivity to accept before timing out the connection
Incoming
An incoming connection for which the server has not yet begun its parts of the handshake.
IncomingZeroRtt
Marker type for a connection that is in the incoming 0-RTT state.
Keys
quinn_proto types that are used in the public iroh API. A complete set of keys for a certain packet space
MtuDiscoveryConfig
quinn types that are used in the public iroh API. Parameters governing MTU discovery.
OpenBi
quinn types that are used in the public iroh API. Future produced by [Connection::open_bi]
OpenUni
quinn types that are used in the public iroh API. Future produced by [Connection::open_uni]
OutgoingZeroRtt
Marker type for a connection that is in the outgoing 0-RTT state.
PathId
quinn_proto types that are used in the public iroh API. Id representing different paths when using multipath extension
PathInfo
Information about a network path used by a Connection.
PathInfoList
List of PathInfo for the network paths of a Connection.
PathStats
quinn types that are used in the public iroh API. Statistics related to a transmission path
QlogConfigqlog
Configuration for qlog trace logging.
QlogFileFactoryqlog
Enables writing qlog traces to a directory.
QuicTransportConfig
Parameters governing the core QUIC state machine
QuicTransportConfigBuilder
Builder for a QuicTransportConfig.
ReadDatagram
quinn types that are used in the public iroh API. Future produced by [Connection::read_datagram]
RecvStream
quinn types that are used in the public iroh API. A stream that can only be used to receive data
RemoteEndpointIdError
RemoteInfo
Information about a remote endpoint.
RetryError
Error for attempting to retry an Incoming which already bears a token from a previous retry
RttEstimator
quinn_proto types that are used in the public iroh API. RTT estimation for a particular network path
SendDatagram
quinn types that are used in the public iroh API. Future produced by [Connection::send_datagram_wait]
SendStream
quinn types that are used in the public iroh API. A stream that can only be used to send data
ServerConfig
Parameters governing incoming connections
ServerConfigBuilder
A builder for a ServerConfig.
StreamId
quinn types that are used in the public iroh API. Identifier for a stream within a particular connection
TokenReuseError
quinn_proto types that are used in the public iroh API. Error for when a validation token may have been reused
TransportAddrInfo
Address of a remote with some metadata
TransportError
quinn_proto types that are used in the public iroh API. Transport-level errors occur when a peer violates the protocol specification
TransportErrorCode
quinn_proto types that are used in the public iroh API. Transport-level error code
TransportParameters
quinn_proto types that are used in the public iroh API. Transport parameters used to negotiate connection-level preferences between peers
UdpStats
quinn_proto types that are used in the public iroh API. Statistics about UDP datagrams transmitted or received on a connection
UnorderedRecvStream
quinn types that are used in the public iroh API. A stream that can be used to receive data out-of-order.
UnsupportedVersion
quinn_proto types that are used in the public iroh API. Error indicating that the specified QUIC version is not supported
ValidationTokenConfig
quinn_proto types that are used in the public iroh API. Configuration for sending and handling validation tokens in incoming connections
VarInt
quinn types that are used in the public iroh API. An integer less than 2^62
VarIntBoundsExceeded
quinn types that are used in the public iroh API. Error returned when constructing a VarInt from a value >= 2^62
Written
quinn types that are used in the public iroh API. Indicates how many bytes and chunks had been transferred in a write operation

Enums§

AfterHandshakeOutcome
Outcome of EndpointHooks::after_handshake
AlpnError
AuthenticationError
BeforeConnectOutcome
Outcome of EndpointHooks::before_connect
BindError
ConnectError
ConnectWithOptsError
ConnectingError
ConnectionError
quinn types that are used in the public iroh API. Reasons why a connection might be lost
Dir
quinn types that are used in the public iroh API. Whether a stream communicates data in both directions or only from the initiator
DirectAddrType
The type of direct address.
FrameType
quinn_proto types that are used in the public iroh API.
InvalidSocketAddrNon-wasm_browser
QuicConnectError
quinn_proto types that are used in the public iroh API. Errors in the parameters being used to create a new connection
ReadError
quinn types that are used in the public iroh API. Errors that arise from reading from a stream.
ReadExactError
quinn types that are used in the public iroh API. Errors that arise from reading from a stream.
ReadToEndError
quinn types that are used in the public iroh API. Errors from RecvStream::read_to_end
RelayMode
Configuration of the relay servers for an Endpoint.
ResetError
quinn types that are used in the public iroh API. Errors that arise while waiting for a stream to be reset
SendDatagramError
quinn types that are used in the public iroh API. Errors that can arise when sending a datagram
Side
quinn types that are used in the public iroh API. Whether an endpoint was the initiator of a connection
Source
The origin or source through which an address associated with a remote endpoint was discovered.
StoppedError
quinn types that are used in the public iroh API. Errors that arise while monitoring for a send stream stop from the peer
TransportAddrUsage
Information how a transport address is used.
WriteError
quinn types that are used in the public iroh API. Errors that arise from writing to a stream
ZeroRttStatus
Returned from OutgoingZeroRttConnection::handshake_completed.

Constants§

ENV_FORCE_STAGING_RELAYS
Environment variable to force the use of staging relays.

Traits§

AeadKey
quinn_proto types that are used in the public iroh API. A key for sealing data with AEAD-based algorithms
ConnectionState
Trait to track the state of a Connection at compile time.
Controller
quinn_proto types that are used in the public iroh API. Common interface for different congestion controllers
ControllerFactory
quinn_proto types that are used in the public iroh API. Constructs controllers on demand
EndpointHooks
EndpointHooks intercept the connection establishment process of an Endpoint.
HandshakeTokenKey
quinn_proto types that are used in the public iroh API. A pseudo random key for HKDF
HeaderKey
quinn_proto types that are used in the public iroh API. Keys used to protect packet headers
PacketKey
quinn_proto types that are used in the public iroh API. Keys used to protect packet payloads
QlogFactoryqlog
Constructs a QlogConfig for individual connections.
TimeSource
quinn_proto types that are used in the public iroh API. Object to get current SystemTime
ToSocketAddrNon-wasm_browser
A simpler version of ToSocketAddrs, that does not do any DNS resolution.
TokenLog
quinn_proto types that are used in the public iroh API. Responsible for limiting clients’ ability to reuse validation tokens

Functions§

default_relay_mode
Returns the default relay mode.
force_staging_infra
Returns true if the use of staging relays is forced.

Type Aliases§

IncomingZeroRttConnection
A QUIC connection on the server-side that can possibly accept 0-RTT data.
OutgoingZeroRttConnection
The client side of a 0-RTT connection.