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 - Future produced by [
Connection::accept_bi] - Accept
Uni - Future produced by [
Connection::accept_uni] - Accepting
- In-progress connection attempt future
- AckFrequency
Config - Parameters for controlling the peer’s acknowledgement frequency
- Application
Close - Reason given by an application for closing the connection
- Builder
- Builder for
Endpoint. - Chunk
- A chunk of data from the receive stream
- Closed
Stream - 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 - Reason given by the transport for closing the connection
- Connection
Stats - Connection statistics
- Crypto
Error - 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 - Error returned by [Session::export_keying_material].
- Frame
Stats - Number of frames transmitted or received of each frame type
- Handshake
Completed - Marker type for a connection that has completed the handshake.
- 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.
- MtuDiscovery
Config - Parameters governing MTU discovery.
- OpenBi
- Future produced by [
Connection::open_bi] - OpenUni
- Future produced by [
Connection::open_uni] - Outgoing
Zero Rtt - Marker type for a connection that is in the outgoing 0-RTT state.
- Path
Info - Information about a network path used by a
Connection. - Path
Info List - List of
PathInfofor the network paths of aConnection. - Path
Stats - Statistics related to a transmission path
- Quinn
Transport Config - Parameters governing the core QUIC state machine
- Read
Datagram - Future produced by [
Connection::read_datagram] - Recv
Stream - A stream that can only be used to receive data
- Remote
Endpoint IdError - Retry
Error - Error for attempting to retry an [
Incoming] which already bears a token from a previous retry - Send
Stream - A stream that can only be used to send data
- Server
Config - Parameters governing incoming connections
- Stream
Id - Identifier for a stream within a particular connection
- Transport
Error - Transport-level errors occur when a peer violates the protocol specification
- Transport
Error Code - Transport-level error code
- UdpStats
- Statistics about UDP datagrams transmitted or received on a connection
- Unsupported
Version - Error indicating that the specified QUIC version is not supported
- VarInt
- An integer less than 2^62
- Weak
Connection Handle - A handle to some connection internals, use with care.
- Written
- Indicates how many bytes and chunks had been transferred in a write operation
Enums§
- AddEndpoint
Addr Error - Alpn
Error - Authentication
Error - Bind
Error - Connect
Error - Connect
With Opts Error - Connecting
Error - Connection
Error - Reasons why a connection might be lost
- Direct
Addr Type - The type of direct address.
- GetMapping
Address Error - Read
Error - Errors that arise from reading from a stream.
- Read
Exact Error - Errors that arise from reading from a stream.
- Read
ToEnd Error - Errors from
RecvStream::read_to_end - Relay
Mode - Configuration of the relay servers for an
Endpoint. - Reset
Error - Errors that arise while waiting for a stream to be reset
- Send
Datagram Error - Errors that can arise when sending a datagram
- Source
- The origin or source through which an address associated with a remote endpoint was discovered.
- Stopped
Error - Errors that arise while monitoring for a send stream stop from the peer
- Transport
Config - Available transport configurations.
- Write
Error - 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
- A key for sealing data with AEAD-based algorithms
- Connection
State - Trait to track the state of a
Connectionat compile time. - Controller
- Common interface for different congestion controllers
- Controller
Factory - Constructs controllers on demand
- Crypto
Server Config - Server-side configuration for the crypto protocol
- Handshake
Token Key - A pseudo random key for HKDF
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.