Expand description
The Endpoint
allows establishing connections to other iroh nodes.
The Endpoint
is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh connections work.
The main items in this module are:
Structs§
- Accept
- Future produced by
Endpoint::accept
. - Accept
Bi - Future produced by [
Connection::accept_bi
] - Accept
Uni - Future produced by [
Connection::accept_uni
] - 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_opts
function. - Connecting
- In-progress connection attempt future
- 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-node might be contactable.
- Direct
Addr Info - Information about a direct address.
- Endpoint
- Controls an iroh node, establishing connections with other nodes.
- Export
Keying Material Error - Error returned by [Session::export_keying_material].
- Frame
Stats - Number of frames transmitted of each frame type
- Incoming
- An incoming connection for which the server has not yet begun its parts of the handshake.
- Incoming
Future - Adaptor to let
Incoming
beawait
ed like aConnecting
. - MtuDiscovery
Config - Parameters governing MTU discovery.
- OpenBi
- Future produced by [
Connection::open_bi
] - OpenUni
- Future produced by [
Connection::open_uni
] - Path
Stats - Statistics related to a transmission path
- Read
Datagram - Future produced by [
Connection::read_datagram
] - Recv
Stream - A stream that can only be used to receive data
- Remote
Info - Details about a remote iroh node which is known to this node.
- Remote
Node 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
Config - Parameters governing the core QUIC state machine
- 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
- Zero
RttAccepted - Future that completes when a connection is fully established.
Enums§
- AddNode
Addr Error - Alpn
Error - Bind
Error - Connect
Error - Connect
With Opts Error - Connection
Error - Reasons why a connection might be lost
- Connection
Type - The type of connection we have to the endpoint.
- Control
Msg - The type of control message we have received.
- Direct
Addr Type - The type of direct address.
- GetMapping
Address Error - Path
Selection test-utils
- Defines the mode of path selection for all traffic flowing through the endpoint.
- 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 node was discovered.
- Stopped
Error - Errors that arise while monitoring for a send stream stop from the peer
- Write
Error - Errors that arise from writing to a stream
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
- 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
true
if the use of staging relays is forced.