Files
iroh/pr/3466/docs/iroh/endpoint/index.html
T

13 lines
18 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The `Endpoint` allows establishing connections to other iroh nodes."><title>iroh::endpoint - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-6c3ea77c.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh" data-themes="" data-resource-suffix="" data-rustdoc-version="1.87.0-nightly (f280acf4c 2025-02-19)" data-channel="nightly" data-search-js="search-f7327375.js" data-settings-js="settings-6dad6058.js" ><script src="../../static.files/storage-3a5871a4.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5332ae0c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh/index.html">iroh</a><span class="version">0.92.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module endpoint</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">iroh</a></div><h1>Module <span>endpoint</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh/endpoint.rs.html#1-3287">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a> allows establishing connections to other iroh nodes.</p>
<p>The <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a> is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the <a href="../index.html" title="mod iroh">module docs</a> for
more details on how iroh connections work.</p>
<p>The main items in this module are:</p>
<ul>
<li><a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a> to establish iroh connections with other nodes.</li>
<li><a href="struct.Builder.html" title="struct iroh::endpoint::Builder"><code>Builder</code></a> to create an <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a>.</li>
</ul>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Accept.html" title="struct iroh::endpoint::Accept">Accept</a></dt><dd>Future produced by <a href="struct.Endpoint.html#method.accept" title="method iroh::endpoint::Endpoint::accept"><code>Endpoint::accept</code></a>.</dd><dt><a class="struct" href="struct.AcceptBi.html" title="struct iroh::endpoint::AcceptBi">Accept<wbr>Bi</a></dt><dd>Future produced by [<code>Connection::accept_bi</code>]</dd><dt><a class="struct" href="struct.AcceptUni.html" title="struct iroh::endpoint::AcceptUni">Accept<wbr>Uni</a></dt><dd>Future produced by [<code>Connection::accept_uni</code>]</dd><dt><a class="struct" href="struct.AckFrequencyConfig.html" title="struct iroh::endpoint::AckFrequencyConfig">AckFrequency<wbr>Config</a></dt><dd>Parameters for controlling the peer’s acknowledgement frequency</dd><dt><a class="struct" href="struct.ApplicationClose.html" title="struct iroh::endpoint::ApplicationClose">Application<wbr>Close</a></dt><dd>Reason given by an application for closing the connection</dd><dt><a class="struct" href="struct.Builder.html" title="struct iroh::endpoint::Builder">Builder</a></dt><dd>Builder for <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a>.</dd><dt><a class="struct" href="struct.Chunk.html" title="struct iroh::endpoint::Chunk">Chunk</a></dt><dd>A chunk of data from the receive stream</dd><dt><a class="struct" href="struct.ClosedStream.html" title="struct iroh::endpoint::ClosedStream">Closed<wbr>Stream</a></dt><dd>Error indicating that a stream has not been opened or has already been finished or reset</dd><dt><a class="struct" href="struct.ConnectOptions.html" title="struct iroh::endpoint::ConnectOptions">Connect<wbr>Options</a></dt><dd>Options for the <a href="struct.Endpoint.html#method.connect_with_opts" title="method iroh::endpoint::Endpoint::connect_with_opts"><code>Endpoint::connect_with_opts</code></a> function.</dd><dt><a class="struct" href="struct.Connecting.html" title="struct iroh::endpoint::Connecting">Connecting</a></dt><dd>In-progress connection attempt future</dd><dt><a class="struct" href="struct.Connection.html" title="struct iroh::endpoint::Connection">Connection</a></dt><dd>A QUIC connection.</dd><dt><a class="struct" href="struct.ConnectionClose.html" title="struct iroh::endpoint::ConnectionClose">Connection<wbr>Close</a></dt><dd>Reason given by the transport for closing the connection</dd><dt><a class="struct" href="struct.ConnectionStats.html" title="struct iroh::endpoint::ConnectionStats">Connection<wbr>Stats</a></dt><dd>Connection statistics</dd><dt><a class="struct" href="struct.CryptoError.html" title="struct iroh::endpoint::CryptoError">Crypto<wbr>Error</a></dt><dd>Generic crypto errors</dd><dt><a class="struct" href="struct.DirectAddr.html" title="struct iroh::endpoint::DirectAddr">Direct<wbr>Addr</a></dt><dd>A <em>direct address</em> on which an iroh-node might be contactable.</dd><dt><a class="struct" href="struct.DirectAddrInfo.html" title="struct iroh::endpoint::DirectAddrInfo">Direct<wbr>Addr<wbr>Info</a></dt><dd>Information about a <em>direct address</em>.</dd><dt><a class="struct" href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint">Endpoint</a></dt><dd>Controls an iroh node, establishing connections with other nodes.</dd><dt><a class="struct" href="struct.ExportKeyingMaterialError.html" title="struct iroh::endpoint::ExportKeyingMaterialError">Export<wbr>Keying<wbr>Material<wbr>Error</a></dt><dd>Error returned by [Session::export_keying_material].</dd><dt><a class="struct" href="struct.FrameStats.html" title="struct iroh::endpoint::FrameStats">Frame<wbr>Stats</a></dt><dd>Number of frames transmitted of each frame type</dd><dt><a class="struct" href="struct.Incoming.html" title="struct iroh::endpoint::Incoming">Incoming</a></dt><dd>An incoming connection for which the server has not yet begun its parts of the
handshake.</dd><dt><a class="struct" href="struct.IncomingFuture.html" title="struct iroh::endpoint::IncomingFuture">Incoming<wbr>Future</a></dt><dd>Adaptor to let <a href="struct.Incoming.html" title="struct iroh::endpoint::Incoming"><code>Incoming</code></a> be <code>await</code>ed like a <a href="struct.Connecting.html" title="struct iroh::endpoint::Connecting"><code>Connecting</code></a>.</dd><dt><a class="struct" href="struct.MtuDiscoveryConfig.html" title="struct iroh::endpoint::MtuDiscoveryConfig">MtuDiscovery<wbr>Config</a></dt><dd>Parameters governing MTU discovery.</dd><dt><a class="struct" href="struct.OpenBi.html" title="struct iroh::endpoint::OpenBi">OpenBi</a></dt><dd>Future produced by [<code>Connection::open_bi</code>]</dd><dt><a class="struct" href="struct.OpenUni.html" title="struct iroh::endpoint::OpenUni">OpenUni</a></dt><dd>Future produced by [<code>Connection::open_uni</code>]</dd><dt><a class="struct" href="struct.PathStats.html" title="struct iroh::endpoint::PathStats">Path<wbr>Stats</a></dt><dd>Statistics related to a transmission path</dd><dt><a class="struct" href="struct.ReadDatagram.html" title="struct iroh::endpoint::ReadDatagram">Read<wbr>Datagram</a></dt><dd>Future produced by [<code>Connection::read_datagram</code>]</dd><dt><a class="struct" href="struct.RecvStream.html" title="struct iroh::endpoint::RecvStream">Recv<wbr>Stream</a></dt><dd>A stream that can only be used to receive data</dd><dt><a class="struct" href="struct.RemoteInfo.html" title="struct iroh::endpoint::RemoteInfo">Remote<wbr>Info</a></dt><dd>Details about a remote iroh node which is known to this node.</dd><dt><a class="struct" href="struct.RemoteNodeIdError.html" title="struct iroh::endpoint::RemoteNodeIdError">Remote<wbr>Node<wbr>IdError</a></dt><dt><a class="struct" href="struct.RetryError.html" title="struct iroh::endpoint::RetryError">Retry<wbr>Error</a></dt><dd>Error for attempting to retry an [<code>Incoming</code>] which already bears a token from a previous retry</dd><dt><a class="struct" href="struct.SendStream.html" title="struct iroh::endpoint::SendStream">Send<wbr>Stream</a></dt><dd>A stream that can only be used to send data</dd><dt><a class="struct" href="struct.ServerConfig.html" title="struct iroh::endpoint::ServerConfig">Server<wbr>Config</a></dt><dd>Parameters governing incoming connections</dd><dt><a class="struct" href="struct.StreamId.html" title="struct iroh::endpoint::StreamId">Stream<wbr>Id</a></dt><dd>Identifier for a stream within a particular connection</dd><dt><a class="struct" href="struct.TransportConfig.html" title="struct iroh::endpoint::TransportConfig">Transport<wbr>Config</a></dt><dd>Parameters governing the core QUIC state machine</dd><dt><a class="struct" href="struct.TransportError.html" title="struct iroh::endpoint::TransportError">Transport<wbr>Error</a></dt><dd>Transport-level errors occur when a peer violates the protocol specification</dd><dt><a class="struct" href="struct.TransportErrorCode.html" title="struct iroh::endpoint::TransportErrorCode">Transport<wbr>Error<wbr>Code</a></dt><dd>Transport-level error code</dd><dt><a class="struct" href="struct.UdpStats.html" title="struct iroh::endpoint::UdpStats">UdpStats</a></dt><dd>Statistics about UDP datagrams transmitted or received on a connection</dd><dt><a class="struct" href="struct.UnsupportedVersion.html" title="struct iroh::endpoint::UnsupportedVersion">Unsupported<wbr>Version</a></dt><dd>Error indicating that the specified QUIC version is not supported</dd><dt><a class="struct" href="struct.VarInt.html" title="struct iroh::endpoint::VarInt">VarInt</a></dt><dd>An integer less than 2^62</dd><dt><a class="struct" href="struct.WeakConnectionHandle.html" title="struct iroh::endpoint::WeakConnectionHandle">Weak<wbr>Connection<wbr>Handle</a></dt><dd>A handle to some connection internals, use with care.</dd><dt><a class="struct" href="struct.Written.html" title="struct iroh::endpoint::Written">Written</a></dt><dd>Indicates how many bytes and chunks had been transferred in a write operation</dd><dt><a class="struct" href="struct.ZeroRttAccepted.html" title="struct iroh::endpoint::ZeroRttAccepted">Zero<wbr>RttAccepted</a></dt><dd>Future that completes when a connection is fully established.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.AddNodeAddrError.html" title="enum iroh::endpoint::AddNodeAddrError">AddNode<wbr>Addr<wbr>Error</a></dt><dt><a class="enum" href="enum.AlpnError.html" title="enum iroh::endpoint::AlpnError">Alpn<wbr>Error</a></dt><dt><a class="enum" href="enum.BindError.html" title="enum iroh::endpoint::BindError">Bind<wbr>Error</a></dt><dt><a class="enum" href="enum.ConnectError.html" title="enum iroh::endpoint::ConnectError">Connect<wbr>Error</a></dt><dt><a class="enum" href="enum.ConnectWithOptsError.html" title="enum iroh::endpoint::ConnectWithOptsError">Connect<wbr>With<wbr>Opts<wbr>Error</a></dt><dt><a class="enum" href="enum.ConnectionError.html" title="enum iroh::endpoint::ConnectionError">Connection<wbr>Error</a></dt><dd>Reasons why a connection might be lost</dd><dt><a class="enum" href="enum.ConnectionType.html" title="enum iroh::endpoint::ConnectionType">Connection<wbr>Type</a></dt><dd>The type of connection we have to the endpoint.</dd><dt><a class="enum" href="enum.ControlMsg.html" title="enum iroh::endpoint::ControlMsg">Control<wbr>Msg</a></dt><dd>The type of control message we have received.</dd><dt><a class="enum" href="enum.DirectAddrType.html" title="enum iroh::endpoint::DirectAddrType">Direct<wbr>Addr<wbr>Type</a></dt><dd>The type of direct address.</dd><dt><a class="enum" href="enum.GetMappingAddressError.html" title="enum iroh::endpoint::GetMappingAddressError">GetMapping<wbr>Address<wbr>Error</a></dt><dt><a class="enum" href="enum.PathSelection.html" title="enum iroh::endpoint::PathSelection">Path<wbr>Selection</a><wbr><span class="stab portability" title="Available on crate feature `test-utils` only"><code>test-utils</code></span></dt><dd>Defines the mode of path selection for all traffic flowing through
the endpoint.</dd><dt><a class="enum" href="enum.ReadError.html" title="enum iroh::endpoint::ReadError">Read<wbr>Error</a></dt><dd>Errors that arise from reading from a stream.</dd><dt><a class="enum" href="enum.ReadExactError.html" title="enum iroh::endpoint::ReadExactError">Read<wbr>Exact<wbr>Error</a></dt><dd>Errors that arise from reading from a stream.</dd><dt><a class="enum" href="enum.ReadToEndError.html" title="enum iroh::endpoint::ReadToEndError">Read<wbr>ToEnd<wbr>Error</a></dt><dd>Errors from <a href="struct.RecvStream.html#method.read_to_end" title="method iroh::endpoint::RecvStream::read_to_end"><code>RecvStream::read_to_end</code></a></dd><dt><a class="enum" href="enum.RelayMode.html" title="enum iroh::endpoint::RelayMode">Relay<wbr>Mode</a></dt><dd>Configuration of the relay servers for an <a href="struct.Endpoint.html" title="struct iroh::endpoint::Endpoint"><code>Endpoint</code></a>.</dd><dt><a class="enum" href="enum.ResetError.html" title="enum iroh::endpoint::ResetError">Reset<wbr>Error</a></dt><dd>Errors that arise while waiting for a stream to be reset</dd><dt><a class="enum" href="enum.SendDatagramError.html" title="enum iroh::endpoint::SendDatagramError">Send<wbr>Datagram<wbr>Error</a></dt><dd>Errors that can arise when sending a datagram</dd><dt><a class="enum" href="enum.Source.html" title="enum iroh::endpoint::Source">Source</a></dt><dd>The origin or <em>source</em> through which an address associated with a remote node
was discovered.</dd><dt><a class="enum" href="enum.StoppedError.html" title="enum iroh::endpoint::StoppedError">Stopped<wbr>Error</a></dt><dd>Errors that arise while monitoring for a send stream stop from the peer</dd><dt><a class="enum" href="enum.WriteError.html" title="enum iroh::endpoint::WriteError">Write<wbr>Error</a></dt><dd>Errors that arise from writing to a stream</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.ENV_FORCE_STAGING_RELAYS.html" title="constant iroh::endpoint::ENV_FORCE_STAGING_RELAYS">ENV_<wbr>FORCE_<wbr>STAGING_<wbr>RELAYS</a></dt><dd>Environment variable to force the use of staging relays.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.AeadKey.html" title="trait iroh::endpoint::AeadKey">AeadKey</a></dt><dd>A key for sealing data with AEAD-based algorithms</dd><dt><a class="trait" href="trait.Controller.html" title="trait iroh::endpoint::Controller">Controller</a></dt><dd>Common interface for different congestion controllers</dd><dt><a class="trait" href="trait.ControllerFactory.html" title="trait iroh::endpoint::ControllerFactory">Controller<wbr>Factory</a></dt><dd>Constructs controllers on demand</dd><dt><a class="trait" href="trait.CryptoServerConfig.html" title="trait iroh::endpoint::CryptoServerConfig">Crypto<wbr>Server<wbr>Config</a></dt><dd>Server-side configuration for the crypto protocol</dd><dt><a class="trait" href="trait.HandshakeTokenKey.html" title="trait iroh::endpoint::HandshakeTokenKey">Handshake<wbr>Token<wbr>Key</a></dt><dd>A pseudo random key for HKDF</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.default_relay_mode.html" title="fn iroh::endpoint::default_relay_mode">default_<wbr>relay_<wbr>mode</a></dt><dd>Returns the default relay mode.</dd><dt><a class="fn" href="fn.force_staging_infra.html" title="fn iroh::endpoint::force_staging_infra">force_<wbr>staging_<wbr>infra</a></dt><dd>Returns <code>true</code> if the use of staging relays is forced.</dd></dl></section></div></main></body></html>