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. - Accept
Bi quinntypes that are used in the public iroh API. Future produced by [Connection::accept_bi]- Accept
Uni quinntypes that are used in the public iroh API. Future produced by [Connection::accept_uni]- Accepting
- In-progress connection attempt future
- AckFrequency
Config quinntypes that are used in the public iroh API. Parameters for controlling the peer’s acknowledgement frequency- Application
Close quinn_prototypes that are used in the public iroh API. Reason given by an application for closing the connection- Bind
Opts Non- wasm_browser - Options when configuring binding an IP socket.
- Builder
- Builder for
Endpoint. - Chunk
quinn_prototypes that are used in the public iroh API. A chunk of data from the receive stream- Closed
Stream quinntypes that are used in the public iroh API. Error indicating that a stream has not been opened or has already been finished or reset- Connect
Options - Options for the
Endpoint::connect_with_optsfunction. - Connecting
- An outgoing connection in progress.
- Connection
- A QUIC connection.
- Connection
Close quinn_prototypes that are used in the public iroh API. Reason given by the transport for closing the connection- Connection
Info - Information about a connection.
- Connection
Stats quinntypes that are used in the public iroh API. Connection statistics- Controller
Metrics quinn_prototypes that are used in the public iroh API. Common congestion controller metrics- Crypto
Error quinn_prototypes that are used in the public iroh API. Generic crypto errors- Direct
Addr - A direct address on which an iroh-endpoint might be contactable.
- Endpoint
- Controls an iroh endpoint, establishing connections with other endpoints.
- Export
Keying Material Error quinn_prototypes that are used in the public iroh API. Error returned by [Session::export_keying_material].- Frame
Stats quinn_prototypes that are used in the public iroh API. Number of frames transmitted or received of each frame type- Handshake
Completed - Marker type for a connection that has completed the handshake.
- Idle
Timeout quinntypes 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.
- Incoming
Zero Rtt - Marker type for a connection that is in the incoming 0-RTT state.
- Keys
quinn_prototypes that are used in the public iroh API. A complete set of keys for a certain packet space- MtuDiscovery
Config quinntypes that are used in the public iroh API. Parameters governing MTU discovery.- OpenBi
quinntypes that are used in the public iroh API. Future produced by [Connection::open_bi]- OpenUni
quinntypes that are used in the public iroh API. Future produced by [Connection::open_uni]- Outgoing
Zero Rtt - Marker type for a connection that is in the outgoing 0-RTT state.
- PathId
quinn_prototypes that are used in the public iroh API. Id representing different paths when using multipath extension- Path
Info - Information about a network path used by a
Connection. - Path
Info List - List of
PathInfofor the network paths of aConnection. - Path
Stats quinntypes that are used in the public iroh API. Statistics related to a transmission path- Qlog
Config qlog - Configuration for qlog trace logging.
- Qlog
File Factory qlog - Enables writing qlog traces to a directory.
- Quic
Transport Config - Parameters governing the core QUIC state machine
- Quic
Transport Config Builder - Builder for a
QuicTransportConfig. - Read
Datagram quinntypes that are used in the public iroh API. Future produced by [Connection::read_datagram]- Recv
Stream quinntypes that are used in the public iroh API. A stream that can only be used to receive data- Remote
Endpoint IdError - Remote
Info - Information about a remote endpoint.
- Retry
Error - Error for attempting to retry an
Incomingwhich already bears a token from a previous retry - RttEstimator
quinn_prototypes that are used in the public iroh API. RTT estimation for a particular network path- Send
Datagram quinntypes that are used in the public iroh API. Future produced by [Connection::send_datagram_wait]- Send
Stream quinntypes that are used in the public iroh API. A stream that can only be used to send data- Server
Config - Parameters governing incoming connections
- Server
Config Builder - A builder for a
ServerConfig. - Stream
Id quinntypes that are used in the public iroh API. Identifier for a stream within a particular connection- Token
Reuse Error quinn_prototypes that are used in the public iroh API. Error for when a validation token may have been reused- Transport
Addr Info - Address of a remote with some metadata
- Transport
Error quinn_prototypes that are used in the public iroh API. Transport-level errors occur when a peer violates the protocol specification- Transport
Error Code quinn_prototypes that are used in the public iroh API. Transport-level error code- Transport
Parameters quinn_prototypes that are used in the public iroh API. Transport parameters used to negotiate connection-level preferences between peers- UdpStats
quinn_prototypes that are used in the public iroh API. Statistics about UDP datagrams transmitted or received on a connection- Unordered
Recv Stream quinntypes that are used in the public iroh API. A stream that can be used to receive data out-of-order.- Unsupported
Version quinn_prototypes that are used in the public iroh API. Error indicating that the specified QUIC version is not supported- Validation
Token Config quinn_prototypes that are used in the public iroh API. Configuration for sending and handling validation tokens in incoming connections- VarInt
quinntypes that are used in the public iroh API. An integer less than 2^62- VarInt
Bounds Exceeded quinntypes that are used in the public iroh API. Error returned when constructing aVarIntfrom a value >= 2^62- Written
quinntypes that are used in the public iroh API. Indicates how many bytes and chunks had been transferred in a write operation
Enums§
- After
Handshake Outcome - Outcome of
EndpointHooks::after_handshake - Alpn
Error - Authentication
Error - Before
Connect Outcome - Outcome of
EndpointHooks::before_connect - Bind
Error - Connect
Error - Connect
With Opts Error - Connecting
Error - Connection
Error quinntypes that are used in the public iroh API. Reasons why a connection might be lost- Dir
quinntypes that are used in the public iroh API. Whether a stream communicates data in both directions or only from the initiator- Direct
Addr Type - The type of direct address.
- Frame
Type quinn_prototypes that are used in the public iroh API.- Invalid
Socket Addr Non- wasm_browser - Quic
Connect Error quinn_prototypes that are used in the public iroh API. Errors in the parameters being used to create a new connection- Read
Error quinntypes that are used in the public iroh API. Errors that arise from reading from a stream.- Read
Exact Error quinntypes that are used in the public iroh API. Errors that arise from reading from a stream.- Read
ToEnd Error quinntypes that are used in the public iroh API. Errors fromRecvStream::read_to_end- Relay
Mode - Configuration of the relay servers for an
Endpoint. - Reset
Error quinntypes that are used in the public iroh API. Errors that arise while waiting for a stream to be reset- Send
Datagram Error quinntypes that are used in the public iroh API. Errors that can arise when sending a datagram- Side
quinntypes 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.
- Stopped
Error quinntypes that are used in the public iroh API. Errors that arise while monitoring for a send stream stop from the peer- Transport
Addr Usage - Information how a transport address is used.
- Write
Error quinntypes that are used in the public iroh API. Errors that arise from writing to a stream- Zero
RttStatus - Returned from
OutgoingZeroRttConnection::handshake_completed.
Constants§
- ENV_
FORCE_ STAGING_ RELAYS - Environment variable to force the use of staging relays.
Traits§
- AeadKey
quinn_prototypes that are used in the public iroh API. A key for sealing data with AEAD-based algorithms- Connection
State - Trait to track the state of a
Connectionat compile time. - Controller
quinn_prototypes that are used in the public iroh API. Common interface for different congestion controllers- Controller
Factory quinn_prototypes that are used in the public iroh API. Constructs controllers on demand- Endpoint
Hooks - EndpointHooks intercept the connection establishment process of an
Endpoint. - Handshake
Token Key quinn_prototypes that are used in the public iroh API. A pseudo random key for HKDF- Header
Key quinn_prototypes that are used in the public iroh API. Keys used to protect packet headers- Packet
Key quinn_prototypes that are used in the public iroh API. Keys used to protect packet payloads- Qlog
Factory qlog - Constructs a
QlogConfigfor individual connections. - Time
Source quinn_prototypes that are used in the public iroh API. Object to get currentSystemTime- ToSocket
Addr Non- wasm_browser - A simpler version of
ToSocketAddrs, that does not do any DNS resolution. - Token
Log quinn_prototypes 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
trueif the use of staging relays is forced.
Type Aliases§
- Incoming
Zero RttConnection - A QUIC connection on the server-side that can possibly accept 0-RTT data.
- Outgoing
Zero RttConnection - The client side of a 0-RTT connection.