Module endpoint

Module endpoint 

Source
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.
AcceptBi
Future produced by [Connection::accept_bi]
AcceptUni
Future produced by [Connection::accept_uni]
Accepting
In-progress connection attempt future
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
An outgoing connection in progress.
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-endpoint might be contactable.
Endpoint
Controls an iroh endpoint, establishing connections with other endpoints.
ExportKeyingMaterialError
Error returned by [Session::export_keying_material].
FrameStats
Number of frames transmitted or received of each frame type
HandshakeCompleted
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.
IncomingZeroRtt
Marker type for a connection that is in the incoming 0-RTT state.
MtuDiscoveryConfig
Parameters governing MTU discovery.
OpenBi
Future produced by [Connection::open_bi]
OpenUni
Future produced by [Connection::open_uni]
OutgoingZeroRtt
Marker type for a connection that is in the outgoing 0-RTT state.
PathInfo
Information about a network path used by a Connection.
PathInfoList
List of PathInfo for the network paths of a Connection.
PathStats
Statistics related to a transmission path
QuinnTransportConfig
Parameters governing the core QUIC state machine
ReadDatagram
Future produced by [Connection::read_datagram]
RecvStream
A stream that can only be used to receive data
RemoteEndpointIdError
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
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

Enums§

AddEndpointAddrError
AlpnError
AuthenticationError
BindError
ConnectError
ConnectWithOptsError
ConnectingError
ConnectionError
Reasons why a connection might be lost
DirectAddrType
The type of direct address.
GetMappingAddressError
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 endpoint was discovered.
StoppedError
Errors that arise while monitoring for a send stream stop from the peer
TransportConfig
Available transport configurations.
WriteError
Errors that arise from writing to a stream
ZeroRttStatus
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
ConnectionState
Trait to track the state of a Connection at compile time.
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.

Type Aliases§

IncomingZeroRttConnection
A QUIC connection on the server-side that can possibly accept 0-RTT data.
OutgoingZeroRttConnection
The client side of a 0-RTT connection.