mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 08:01:44 +00:00
deploy: 61986d6e5187d4de9e3d5fa4c57fc905a0f15045
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<!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.91.1</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-3277">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>
|
||||
<!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.91.1</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-3272">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>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3199,8 +3199,8 @@
|
||||
<a href=#3199 id=3199 data-nosnippet>3199</a>
|
||||
<a href=#3200 id=3200 data-nosnippet>3200</a> <span class="doccomment">/// Test that peers are properly restored
|
||||
<a href=#3201 id=3201 data-nosnippet>3201</a> </span><span class="attr">#[tokio::test]
|
||||
<a href=#3202 id=3202 data-nosnippet>3202</a> </span><span class="comment">// #[traced_test]
|
||||
<a href=#3203 id=3203 data-nosnippet>3203</a> </span><span class="kw">async fn </span>connect_multi() -> <span class="prelude-ty">Result</span> {
|
||||
<a href=#3202 id=3202 data-nosnippet>3202</a> #[traced_test]
|
||||
<a href=#3203 id=3203 data-nosnippet>3203</a> </span><span class="kw">async fn </span>connect_multi_time() -> <span class="prelude-ty">Result</span> {
|
||||
<a href=#3204 id=3204 data-nosnippet>3204</a> <span class="kw">let </span>n = <span class="number">32</span>;
|
||||
<a href=#3205 id=3205 data-nosnippet>3205</a>
|
||||
<a href=#3206 id=3206 data-nosnippet>3206</a> <span class="kw">const </span>NOOP_ALPN: <span class="kw-2">&</span>[u8] = <span class="string">b"noop"</span>;
|
||||
@@ -3266,12 +3266,7 @@
|
||||
<a href=#3266 id=3266 data-nosnippet>3266</a>
|
||||
<a href=#3267 id=3267 data-nosnippet>3267</a> <span class="macro">println!</span>(<span class="string">"Round 0: {}s, {}s per connection"</span>, dt0, dt0 / (n <span class="kw">as </span>f64));
|
||||
<a href=#3268 id=3268 data-nosnippet>3268</a> <span class="macro">println!</span>(<span class="string">"Round 1: {}s, {}s per connection"</span>, dt1, dt1 / (n <span class="kw">as </span>f64));
|
||||
<a href=#3269 id=3269 data-nosnippet>3269</a> <span class="macro">assert!</span>(
|
||||
<a href=#3270 id=3270 data-nosnippet>3270</a> dt0 / dt1 < <span class="number">20.0</span>,
|
||||
<a href=#3271 id=3271 data-nosnippet>3271</a> <span class="string">"First round: {}s, second round {}s"</span>,
|
||||
<a href=#3272 id=3272 data-nosnippet>3272</a> dt0,
|
||||
<a href=#3273 id=3273 data-nosnippet>3273</a> dt1
|
||||
<a href=#3274 id=3274 data-nosnippet>3274</a> );
|
||||
<a href=#3275 id=3275 data-nosnippet>3275</a> <span class="prelude-val">Ok</span>(())
|
||||
<a href=#3276 id=3276 data-nosnippet>3276</a> }
|
||||
<a href=#3277 id=3277 data-nosnippet>3277</a>}</code></pre></div></section></main></body></html>
|
||||
<a href=#3269 id=3269 data-nosnippet>3269</a> <span class="macro">assert!</span>(dt0 / dt1 < <span class="number">20.0</span>, <span class="string">"First round: {dt0}s, second round {dt1}s"</span>);
|
||||
<a href=#3270 id=3270 data-nosnippet>3270</a> <span class="prelude-val">Ok</span>(())
|
||||
<a href=#3271 id=3271 data-nosnippet>3271</a> }
|
||||
<a href=#3272 id=3272 data-nosnippet>3272</a>}</code></pre></div></section></main></body></html>
|
||||
+2905
-2798
File diff suppressed because it is too large
Load Diff
@@ -454,7 +454,7 @@
|
||||
<a href=#454 id=454 data-nosnippet>454</a> }
|
||||
<a href=#455 id=455 data-nosnippet>455</a>
|
||||
<a href=#456 id=456 data-nosnippet>456</a> <span class="doccomment">/// Best effort sending
|
||||
<a href=#457 id=457 data-nosnippet>457</a> </span><span class="kw">fn </span>inner_try_send(
|
||||
<a href=#457 id=457 data-nosnippet>457</a> </span><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">fn </span>inner_try_send(
|
||||
<a href=#458 id=458 data-nosnippet>458</a> <span class="kw-2">&</span><span class="self">self</span>,
|
||||
<a href=#459 id=459 data-nosnippet>459</a> destination: <span class="kw-2">&</span>Addr,
|
||||
<a href=#460 id=460 data-nosnippet>460</a> src: <span class="prelude-ty">Option</span><IpAddr>,
|
||||
@@ -504,7 +504,7 @@
|
||||
<a href=#504 id=504 data-nosnippet>504</a> transmit: <span class="kw-2">&</span>quinn_udp::Transmit,
|
||||
<a href=#505 id=505 data-nosnippet>505</a> cx: <span class="kw-2">&mut </span>Context,
|
||||
<a href=#506 id=506 data-nosnippet>506</a> ) -> Poll<io::Result<()>> {
|
||||
<a href=#507 id=507 data-nosnippet>507</a> <span class="kw">let </span>active_paths = <span class="self">self</span>.msock.prepare_send(transmit)<span class="question-mark">?</span>;
|
||||
<a href=#507 id=507 data-nosnippet>507</a> <span class="kw">let </span>active_paths = <span class="self">self</span>.msock.prepare_send(<span class="kw-2">&</span><span class="self">self</span>, transmit)<span class="question-mark">?</span>;
|
||||
<a href=#508 id=508 data-nosnippet>508</a>
|
||||
<a href=#509 id=509 data-nosnippet>509</a> <span class="kw">if </span>active_paths.is_empty() {
|
||||
<a href=#510 id=510 data-nosnippet>510</a> <span class="comment">// Returning Ok here means we let QUIC timeout.
|
||||
@@ -556,7 +556,7 @@
|
||||
<a href=#556 id=556 data-nosnippet>556</a> }
|
||||
<a href=#557 id=557 data-nosnippet>557</a>
|
||||
<a href=#558 id=558 data-nosnippet>558</a> <span class="kw">fn </span>try_send(<span class="self">self</span>: Pin<<span class="kw-2">&mut </span><span class="self">Self</span>>, transmit: <span class="kw-2">&</span>quinn_udp::Transmit) -> io::Result<()> {
|
||||
<a href=#559 id=559 data-nosnippet>559</a> <span class="kw">let </span>active_paths = <span class="self">self</span>.msock.prepare_send(transmit)<span class="question-mark">?</span>;
|
||||
<a href=#559 id=559 data-nosnippet>559</a> <span class="kw">let </span>active_paths = <span class="self">self</span>.msock.prepare_send(<span class="kw-2">&</span><span class="self">self</span>, transmit)<span class="question-mark">?</span>;
|
||||
<a href=#560 id=560 data-nosnippet>560</a> <span class="kw">if </span>active_paths.is_empty() {
|
||||
<a href=#561 id=561 data-nosnippet>561</a> <span class="comment">// Returning Ok here means we let QUIC timeout.
|
||||
<a href=#562 id=562 data-nosnippet>562</a> // Returning an error would immediately fail a connection.
|
||||
|
||||
Reference in New Issue
Block a user