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:
Re-exports§
pub use crate::tls::TlsConfigError;
Modules§
- presets
- Presets allow configuring an endpoint quickly with a chosen set of defaults.
- transports
unstable-custom-transports - Types for defining custom transports and path selectors.
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
- Bind
Opts Non- wasm_browser - Options when configuring binding an IP socket.
- Builder
- Builder for
Endpoint. - Chunk
- A chunk of data from the receive stream
- Closed
- State of a [
Connection] at the moment it was closed. - 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.
- Controller
Metrics - Common congestion controller metrics used both for logging purposes
but also to alter the pacing of the connection with
pacing_rateandsend_quantum - Crypto
Error - Generic crypto errors
- Decrypted
Initial - Decrypted payload of a QUIC Initial packet
- Direct
Addr - A direct address on which an iroh-endpoint might be contactable.
- Endpoint
- Controls an iroh endpoint, establishing connections with other endpoints.
- Endpoint
Closed - Future returned from
Endpoint::closed. - 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.
- Idle
Timeout - 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
Alpns - Iterator over ALPN protocol names from a TLS ClientHello
- Incoming
Zero Rtt - Marker type for a connection that is in the incoming 0-RTT state.
- Keys
- A complete set of keys for a certain packet space
- MtuDiscovery
Config - Parameters governing MTU discovery.
- NetReport
Config - Configuration for the net report component.
- 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
- A single path within a
PathListsnapshot. - Path
Event Stream - A
'staticstream ofPathEvents. - PathId
- Id representing different paths when using multipath extension
- Path
List - A borrowed snapshot of a connection’s currently-open paths.
- Path
List Iter - An iterator over the open paths in a
PathListsnapshot. - Path
List Stream - A stream of
PathListsnapshots for a connection. - Path
Stats - 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 - Future produced by [
Connection::read_datagram] - Read
Many Datagrams - Future produced by [
Connection::read_many_datagrams] - Recv
Stream - A stream that can only be used to receive data
- Relay
Status - Connection status of a single home relay.
- 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
- RTT estimation for a particular network path
- Send
Datagram - Future produced by [
Connection::send_datagram_wait] - Send
Stream - 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 - Identifier for a stream within a particular connection
- Token
Reuse Error - Error for when a validation token may have been reused
- Transport
Addr Info - Address of a remote with some metadata
- Transport
Error - Transport-level errors occur when a peer violates the protocol specification
- Transport
Error Code - Transport-level error code
- Transport
Parameters - Transport parameters used to negotiate connection-level preferences between peers
- UdpStats
- Statistics about UDP datagrams transmitted or received on a connection.
- Unordered
Recv Stream - A stream that can be used to receive data out-of-order.
- Unsupported
Version - Error indicating that the specified QUIC version is not supported
- Validation
Token Config - Configuration for sending and handling validation tokens in incoming connections
- VarInt
- An integer less than 2^62
- VarInt
Bounds Exceeded - Error returned when constructing a
VarIntfrom a value >= 2^62 - Weak
Connection Handle - A weak handle to a
Connection.
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 - Reasons why a connection might be lost
- Dir
- Whether a stream communicates data in both directions or only from the initiator
- Direct
Addr Type - The type of direct address.
- Endpoint
Error - Frame
Type - Incoming
Addr - The remote address for an incoming connection.
- Invalid
Socket Addr Non- wasm_browser - Local
Transport Addr - The local address of a network path.
- Path
Event - Lifecycle notifications for a transmission paths in a connection.
- Portmapper
Config - Configuration for the portmapper service (UPnP, PCP, NAT-PMP).
- Quic
Connect Error - Errors in the parameters being used to create a new connection
- 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
- Side
- Whether an endpoint was the initiator of a connection
- Stopped
Error - 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 - 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§
- 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
- Endpoint
Hooks - EndpointHooks intercept the connection establishment process of an
Endpoint. - Handshake
Token Key - The trait for encrypting tokens that power retry packets and NEW_TOKEN frames.
- Header
Key - Keys used to protect packet headers
- Packet
Key - Keys used to protect packet payloads
- Qlog
Factory qlog - Constructs a
QlogConfigfor individual connections. - Time
Source - Object to get current
SystemTime - ToSocket
Addr Non- wasm_browser - A simpler version of
ToSocketAddrs, that does not do any DNS resolution. - Token
Log - 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.