Module endpoint

Source
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.
AcceptBi
Future produced by [Connection::accept_bi]
AcceptUni
Future produced by [Connection::accept_uni]
AckFrequencyConfig
Parameters for controlling the peer’s acknowledgement frequency
ApplicationClose
Reason given by an application for closing the connection
Builder
Builder for Endpoint.
Chunk
A chunk of data from the receive stream
ClosedStream
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
In-progress connection attempt future
Connection
A QUIC connection.
ConnectionClose
Reason given by the transport for closing the connection
ConnectionStats
Connection statistics
CryptoError
Generic crypto errors
DirectAddr
A direct address on which an iroh-node might be contactable.
DirectAddrInfo
Information about a direct address.
Endpoint
Controls an iroh node, establishing connections with other nodes.
ExportKeyingMaterialError
Error returned by [Session::export_keying_material].
FrameStats
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.
IncomingFuture
Adaptor to let Incoming be awaited like a Connecting.
MtuDiscoveryConfig
Parameters governing MTU discovery.
OpenBi
Future produced by [Connection::open_bi]
OpenUni
Future produced by [Connection::open_uni]
PathStats
Statistics related to a transmission path
ReadDatagram
Future produced by [Connection::read_datagram]
RecvStream
A stream that can only be used to receive data
RemoteInfo
Details about a remote iroh node which is known to this node.
RemoteNodeIdError
RetryError
Error for attempting to retry an [Incoming] which already bears a token from a previous retry
SendStream
A stream that can only be used to send data
ServerConfig
Parameters governing incoming connections
StreamId
Identifier for a stream within a particular connection
TransportConfig
Parameters governing the core QUIC state machine
TransportError
Transport-level errors occur when a peer violates the protocol specification
TransportErrorCode
Transport-level error code
UdpStats
Statistics about UDP datagrams transmitted or received on a connection
UnsupportedVersion
Error indicating that the specified QUIC version is not supported
VarInt
An integer less than 2^62
WeakConnectionHandle
A handle to some connection internals, use with care.
Written
Indicates how many bytes and chunks had been transferred in a write operation
ZeroRttAccepted
Future that completes when a connection is fully established.

Enums§

AddNodeAddrError
AlpnError
BindError
ConnectError
ConnectWithOptsError
ConnectionError
Reasons why a connection might be lost
ConnectionType
The type of connection we have to the endpoint.
ControlMsg
The type of control message we have received.
DirectAddrType
The type of direct address.
GetMappingAddressError
PathSelectiontest-utils
Defines the mode of path selection for all traffic flowing through the endpoint.
ReadError
Errors that arise from reading from a stream.
ReadExactError
Errors that arise from reading from a stream.
ReadToEndError
Errors from RecvStream::read_to_end
RelayMode
Configuration of the relay servers for an Endpoint.
ResetError
Errors that arise while waiting for a stream to be reset
SendDatagramError
Errors that can arise when sending a datagram
Source
The origin or source through which an address associated with a remote node was discovered.
StoppedError
Errors that arise while monitoring for a send stream stop from the peer
WriteError
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
ControllerFactory
Constructs controllers on demand
CryptoServerConfig
Server-side configuration for the crypto protocol
HandshakeTokenKey
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.