diff --git a/pr/3069/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html b/pr/3069/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html index 63b240f083..d1ea1a29fc 100644 --- a/pr/3069/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html +++ b/pr/3069/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust
iroh::defaults

Constant DEFAULT_RELAY_QUIC_PORT

Source
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16
Expand description

The default QUIC port used by the Relay server to accept QUIC connections +DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust

iroh::defaults

Constant DEFAULT_RELAY_QUIC_PORT

pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16
Expand description

The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery

The port is “QUIC” typed on a phone keypad. The default QUIC port used by the Relay server to accept QUIC connections diff --git a/pr/3069/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html b/pr/3069/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html index 27042a1b0b..35b76bab1d 100644 --- a/pr/3069/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html +++ b/pr/3069/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_STUN_PORT in iroh::defaults - Rust

iroh::defaults

Constant DEFAULT_STUN_PORT

Source
pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16
Expand description

The default STUN port used by the Relay server.

+DEFAULT_STUN_PORT in iroh::defaults - Rust
iroh::defaults

Constant DEFAULT_STUN_PORT

pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16
Expand description

The default STUN port used by the Relay server.

The STUN port as defined by RFC 8489 The default STUN port used by the Relay server.

diff --git a/pr/3069/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3069/docs/iroh/metrics/struct.RelayMetrics.html index f181b97fbc..59bc34d596 100644 --- a/pr/3069/docs/iroh/metrics/struct.RelayMetrics.html +++ b/pr/3069/docs/iroh/metrics/struct.RelayMetrics.html @@ -1,4 +1,4 @@ -RelayMetrics in iroh::metrics - Rust
iroh::metrics

Struct RelayMetrics

Source
pub struct RelayMetrics {
Show 21 fields +RelayMetrics in iroh::metrics - Rust
iroh::metrics

Struct RelayMetrics

pub struct RelayMetrics {
Show 21 fields pub bytes_sent: Counter, pub bytes_recv: Counter, pub send_packets_sent: Counter, @@ -42,7 +42,7 @@
§unique_client_keys: Counter

Number of unique client keys per day

§websocket_accepts: Counter

Number of accepted websocket connections

§relay_accepts: Counter

Number of accepted ‘iroh derp http’ connection upgrades

-

Trait Implementations§

Source§

impl Clone for Metrics

Source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Metrics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Metrics

Source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
Source§

impl Iterable for Metrics

Source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
Source§

impl Metric for Metrics

Source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Available on crate feature metrics only.
Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where +

Trait Implementations§

§

impl Clone for Metrics

§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Metrics

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for Metrics

§

fn default() -> Metrics

Returns the “default value” for a type. Read more
§

impl Iterable for Metrics

§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
§

impl Metric for Metrics

§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Available on crate feature metrics only.
Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Available on crate feature metrics only.
Access to this metrics group to record a metric. Only records if this metric is registered in the global registry.
§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/3069/docs/iroh/struct.RelayMap.html b/pr/3069/docs/iroh/struct.RelayMap.html index 6455a2a69f..db261a0740 100644 --- a/pr/3069/docs/iroh/struct.RelayMap.html +++ b/pr/3069/docs/iroh/struct.RelayMap.html @@ -1,26 +1,26 @@ -RelayMap in iroh - Rust
iroh

Struct RelayMap

Source
pub struct RelayMap { /* private fields */ }
Expand description

Configuration of all the relay servers that can be used.

-

Implementations§

Source§

impl RelayMap

Source

pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>

Returns the sorted relay URLs.

-
Source

pub fn empty() -> RelayMap

Create an empty relay map.

-
Source

pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>

Returns an Iterator over all known nodes.

-
Source

pub fn contains_node(&self, url: &RelayUrl) -> bool

Is this a known node?

-
Source

pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>

Get the given node.

-
Source

pub fn len(&self) -> usize

How many nodes are known?

-
Source

pub fn is_empty(&self) -> bool

Are there any nodes in this map?

-
Source

pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap

Creates a new RelayMap with a single relay server configured.

+RelayMap in iroh - Rust
iroh

Struct RelayMap

pub struct RelayMap { /* private fields */ }
Expand description

Configuration of all the relay servers that can be used.

+

Implementations§

§

impl RelayMap

pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>

Returns the sorted relay URLs.

+

pub fn empty() -> RelayMap

Create an empty relay map.

+

pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>

Returns an Iterator over all known nodes.

+

pub fn contains_node(&self, url: &RelayUrl) -> bool

Is this a known node?

+

pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>

Get the given node.

+

pub fn len(&self) -> usize

How many nodes are known?

+

pub fn is_empty(&self) -> bool

Are there any nodes in this map?

+

pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap

Creates a new RelayMap with a single relay server configured.

Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6. If IP addresses are provided, no DNS lookup will be performed.

Sets the port to the default DEFAULT_RELAY_QUIC_PORT.

-
Source

pub fn from_url(url: RelayUrl) -> RelayMap

Returns a RelayMap from a RelayUrl.

+

pub fn from_url(url: RelayUrl) -> RelayMap

Returns a RelayMap from a RelayUrl.

This will use the default STUN port, the default QUIC port (as defined by the iroh-relay crate) and IP addresses resolved from the URL’s host name via DNS. relay nodes are specified at <../../docs/relay_nodes.md>

-
Source

pub fn from_nodes<I>( +

pub fn from_nodes<I>( value: impl IntoIterator<Item = I>, ) -> Result<RelayMap, Error>
where I: Into<Arc<RelayNode>>,

Constructs the RelayMap from an iterator of RelayNodes.

-

Trait Implementations§

Source§

impl Clone for RelayMap

Source§

fn clone(&self) -> RelayMap

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RelayMap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for RelayMap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RelayMap

Source§

fn eq(&self, other: &RelayMap) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl Eq for RelayMap

Source§

impl StructuralPartialEq for RelayMap

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for RelayMap

§

fn clone(&self) -> RelayMap

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RelayMap

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for RelayMap

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl PartialEq for RelayMap

§

fn eq(&self, other: &RelayMap) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
§

impl Eq for RelayMap

§

impl StructuralPartialEq for RelayMap

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3069/docs/iroh/struct.RelayNode.html b/pr/3069/docs/iroh/struct.RelayNode.html index 7da0ec16ae..1ddae9195e 100644 --- a/pr/3069/docs/iroh/struct.RelayNode.html +++ b/pr/3069/docs/iroh/struct.RelayNode.html @@ -1,8 +1,8 @@ -RelayNode in iroh - Rust
iroh

Struct RelayNode

Source
pub struct RelayNode {
+RelayNode in iroh - Rust
iroh

Struct RelayNode

pub struct RelayNode {
     pub url: RelayUrl,
     pub stun_only: bool,
     pub stun_port: u16,
-    pub quic: Option<RelayQuicConfig>,
+    pub quic: Option<RelayQuicConfig>,
 }
Expand description

Information on a specific relay server.

Includes the Url where it can be dialed.

Fields§

§url: RelayUrl

The RelayUrl where this relay server can be dialed.

@@ -11,24 +11,24 @@ functionality is used.

§stun_port: u16

The stun port of the relay server.

Setting this to 0 means the default STUN port is used.

-
§quic: Option<RelayQuicConfig>

Configuration to speak to the QUIC endpoint on the relay server.

+
§quic: Option<RelayQuicConfig>

Configuration to speak to the QUIC endpoint on the relay server.

When None, we will not attempt to do QUIC address discovery with this relay server.

-

Trait Implementations§

Source§

impl Clone for RelayNode

Source§

fn clone(&self) -> RelayNode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RelayNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RelayNode

Trait Implementations§

§

impl Clone for RelayNode

§

fn clone(&self) -> RelayNode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RelayNode

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for RelayNode

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for RelayNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Ord for RelayNode

Source§

fn cmp(&self, other: &RelayNode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for RelayNode

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Ord for RelayNode

§

fn cmp(&self, other: &RelayNode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for RelayNode

Source§

fn eq(&self, other: &RelayNode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl PartialOrd for RelayNode

Source§

fn partial_cmp(&self, other: &RelayNode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the + Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for RelayNode

§

fn eq(&self, other: &RelayNode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
§

impl PartialOrd for RelayNode

§

fn partial_cmp(&self, other: &RelayNode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
Source§

impl Serialize for RelayNode

Source§

fn serialize<__S>( +the >= operator. Read more

§

impl Serialize for RelayNode

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for RelayNode

Source§

impl StructuralPartialEq for RelayNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for RelayNode

§

impl StructuralPartialEq for RelayNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3069/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3069/docs/iroh/test_utils/fn.run_relay_server.html index befdb59842..4ebdc2a805 100644 --- a/pr/3069/docs/iroh/test_utils/fn.run_relay_server.html +++ b/pr/3069/docs/iroh/test_utils/fn.run_relay_server.html @@ -1,4 +1,4 @@ -run_relay_server in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server

Source
pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN and QUIC enabled suitable for tests.

+run_relay_server in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server

Source
pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN and QUIC enabled suitable for tests.

The returned Url is the url of the relay server in the returned RelayMap. -When dropped, the returned Server does will stop running.

+When dropped, the returned [Server] does will stop running.

\ No newline at end of file diff --git a/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with.html index a73916f65e..ba6f84cdfd 100644 --- a/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with.html +++ b/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with.html @@ -1,9 +1,9 @@ run_relay_server_with in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server_with

Source
pub async fn run_relay_server_with(
-    stun: Option<StunConfig>,
+    stun: Option<StunConfig>,
     quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server.

+) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server.

stun can be set to None to disable stun, or set to Some StunConfig, to enable stun on a specific socket.

-

If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.

+

If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.

The return value is similar to run_relay_server.

\ No newline at end of file diff --git a/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with_stun.html index bdff0055f8..974d3f306b 100644 --- a/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with_stun.html +++ b/pr/3069/docs/iroh/test_utils/fn.run_relay_server_with_stun.html @@ -1,4 +1,4 @@ -run_relay_server_with_stun in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server_with_stun

Source
pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN enabled suitable for tests.

+run_relay_server_with_stun in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server_with_stun

Source
pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN enabled suitable for tests.

The returned Url is the url of the relay server in the returned RelayMap. -When dropped, the returned Server does will stop running.

+When dropped, the returned [Server] does will stop running.

\ No newline at end of file diff --git a/pr/3069/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3069/docs/iroh_relay/client/enum.ReceivedMessage.html index 400028a952..2777fc2aba 100644 --- a/pr/3069/docs/iroh_relay/client/enum.ReceivedMessage.html +++ b/pr/3069/docs/iroh_relay/client/enum.ReceivedMessage.html @@ -1,9 +1,9 @@ ReceivedMessage in iroh_relay::client - Rust
iroh_relay::client

Enum ReceivedMessage

Source
pub enum ReceivedMessage {
     ReceivedPacket {
-        remote_node_id: NodeId,
+        remote_node_id: NodeId,
         data: Bytes,
     },
-    NodeGone(NodeId),
+    NodeGone(NodeId),
     Ping([u8; 8]),
     Pong([u8; 8]),
     KeepAlive,
@@ -17,9 +17,9 @@
 }
Expand description

The messages received from a framed relay stream.

This is a type-validated version of the Frames on the RelayCodec.

Variants§

§

ReceivedPacket

Represents an incoming packet.

-

Fields

§remote_node_id: NodeId

The [NodeId] of the packet sender.

+

Fields

§remote_node_id: NodeId

The NodeId of the packet sender.

§data: Bytes

The received packet bytes.

-
§

NodeGone(NodeId)

Indicates that the client identified by the underlying public key had previously sent you a +

§

NodeGone(NodeId)

Indicates that the client identified by the underlying public key had previously sent you a packet but has now disconnected from the server.

§

Ping([u8; 8])

Request from a client or server to reply to the other side with a ReceivedMessage::Pong with the given payload.

diff --git a/pr/3069/docs/iroh_relay/client/struct.Client.html b/pr/3069/docs/iroh_relay/client/struct.Client.html index 33eed831b5..6a41e97406 100644 --- a/pr/3069/docs/iroh_relay/client/struct.Client.html +++ b/pr/3069/docs/iroh_relay/client/struct.Client.html @@ -15,7 +15,7 @@ or the
Source

pub fn finish_ping(&mut self, ping: [u8; 8])

Finish a ping message

Source

pub async fn send( &mut self, - remote_node: NodeId, + remote_node: NodeId, payload: Bytes, ) -> Result<(), ClientError>

Send a packet to the server.

If there is no underlying active relay connection, it creates one before attempting to diff --git a/pr/3069/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3069/docs/iroh_relay/client/struct.ClientBuilder.html index 64aeee12e9..2c74a6c299 100644 --- a/pr/3069/docs/iroh_relay/client/struct.ClientBuilder.html +++ b/pr/3069/docs/iroh_relay/client/struct.ClientBuilder.html @@ -1,6 +1,6 @@ ClientBuilder in iroh_relay::client - Rust

iroh_relay::client

Struct ClientBuilder

Source
pub struct ClientBuilder { /* private fields */ }
Expand description

Build a Client.

-

Implementations§

Source§

impl ClientBuilder

Source

pub fn new(url: impl Into<RelayUrl>) -> Self

Create a new ClientBuilder

-
Source

pub fn server_url(self, url: impl Into<RelayUrl>) -> Self

Sets the server url

+

Implementations§

Source§

impl ClientBuilder

Source

pub fn new(url: impl Into<RelayUrl>) -> Self

Create a new ClientBuilder

+
Source

pub fn server_url(self, url: impl Into<RelayUrl>) -> Self

Sets the server url

Source

pub fn protocol(self, protocol: Protocol) -> Self

Sets whether to connect to the relay via websockets or not. Set to use non-websocket, normal relaying by default.

Source

pub fn address_family_selector<S>(self, selector: S) -> Self
where @@ -15,8 +15,8 @@ work anyway, so we don’t artificially delay the connection speed.

May only be used in tests.

Source

pub fn proxy_url(self, url: Url) -> Self

Set an explicit proxy url to proxy all HTTP(S) traffic through.

Source

pub fn key_cache_capacity(self, capacity: usize) -> Self

Set the capacity of the cache for public keys.

-
Source

pub fn build(self, key: SecretKey, dns_resolver: DnsResolver) -> Client

Build the Client

-
Source

pub fn server_public_key(self, server_public_key: PublicKey) -> Self

The expected [PublicKey] of the relay server we are connecting to.

+
Source

pub fn build(self, key: SecretKey, dns_resolver: DnsResolver) -> Client

Build the Client

+
Source

pub fn server_public_key(self, server_public_key: PublicKey) -> Self

The expected PublicKey of the relay server we are connecting to.

Trait Implementations§

Source§

impl Debug for ClientBuilder

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/3069/docs/iroh_relay/server/struct.Server.html b/pr/3069/docs/iroh_relay/server/struct.Server.html index 0c86c3e45e..bb6c505b3d 100644 --- a/pr/3069/docs/iroh_relay/server/struct.Server.html +++ b/pr/3069/docs/iroh_relay/server/struct.Server.html @@ -14,9 +14,9 @@ case there is an error in the server before it is shut down.

Source

pub fn quic_addr(&self) -> Option<SocketAddr>

The socket address the QUIC server is listening on.

Source

pub fn stun_addr(&self) -> Option<SocketAddr>

The socket address the STUN server is listening on.

Source

pub fn certificates(&self) -> Option<Vec<CertificateDer<'static>>>

The certificates chain if configured with manual TLS certificates.

-
Source

pub fn https_url(&self) -> Option<RelayUrl>

Available on crate feature test-utils only.

Get the server’s https [RelayUrl].

+
Source

pub fn https_url(&self) -> Option<RelayUrl>

Available on crate feature test-utils only.

Get the server’s https RelayUrl.

This uses Self::https_addr so it’s mostly useful for local development.

-
Source

pub fn http_url(&self) -> Option<RelayUrl>

Available on crate feature test-utils only.

Get the server’s http [RelayUrl].

+
Source

pub fn http_url(&self) -> Option<RelayUrl>

Available on crate feature test-utils only.

Get the server’s http RelayUrl.

This uses Self::http_addr so it’s mostly useful for local development.

Trait Implementations§

Source§

impl Debug for Server

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Server

§

impl RefUnwindSafe for Server

§

impl Send for Server

§

impl Sync for Server

§

impl Unpin for Server

§

impl UnwindSafe for Server

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/3069/docs/iroh_relay/struct.RelayMap.html b/pr/3069/docs/iroh_relay/struct.RelayMap.html index f69c9124c5..2f8d052e51 100644 --- a/pr/3069/docs/iroh_relay/struct.RelayMap.html +++ b/pr/3069/docs/iroh_relay/struct.RelayMap.html @@ -1,16 +1,16 @@ RelayMap in iroh_relay - Rust
iroh_relay

Struct RelayMap

Source
pub struct RelayMap { /* private fields */ }
Expand description

Configuration of all the relay servers that can be used.

-

Implementations§

Source§

impl RelayMap

Source

pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>

Returns the sorted relay URLs.

+

Implementations§

Source§

impl RelayMap

Source

pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>

Returns the sorted relay URLs.

Source

pub fn empty() -> Self

Create an empty relay map.

Source

pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>

Returns an Iterator over all known nodes.

-
Source

pub fn contains_node(&self, url: &RelayUrl) -> bool

Is this a known node?

-
Source

pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>

Get the given node.

+
Source

pub fn contains_node(&self, url: &RelayUrl) -> bool

Is this a known node?

+
Source

pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>

Get the given node.

Source

pub fn len(&self) -> usize

How many nodes are known?

Source

pub fn is_empty(&self) -> bool

Are there any nodes in this map?

-
Source

pub fn default_from_node(url: RelayUrl, stun_port: u16) -> Self

Creates a new RelayMap with a single relay server configured.

+
Source

pub fn default_from_node(url: RelayUrl, stun_port: u16) -> Self

Creates a new RelayMap with a single relay server configured.

Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6. If IP addresses are provided, no DNS lookup will be performed.

Sets the port to the default DEFAULT_RELAY_QUIC_PORT.

-
Source

pub fn from_url(url: RelayUrl) -> Self

Returns a RelayMap from a [RelayUrl].

+
Source

pub fn from_url(url: RelayUrl) -> Self

Returns a RelayMap from a RelayUrl.

This will use the default STUN port, the default QUIC port (as defined by the iroh-relay crate) and IP addresses resolved from the URL’s host name via DNS. diff --git a/pr/3069/docs/iroh_relay/struct.RelayNode.html b/pr/3069/docs/iroh_relay/struct.RelayNode.html index 5a4af90c83..ebdf471da6 100644 --- a/pr/3069/docs/iroh_relay/struct.RelayNode.html +++ b/pr/3069/docs/iroh_relay/struct.RelayNode.html @@ -1,11 +1,11 @@ RelayNode in iroh_relay - Rust

iroh_relay

Struct RelayNode

Source
pub struct RelayNode {
-    pub url: RelayUrl,
+    pub url: RelayUrl,
     pub stun_only: bool,
     pub stun_port: u16,
     pub quic: Option<RelayQuicConfig>,
 }
Expand description

Information on a specific relay server.

Includes the Url where it can be dialed.

-

Fields§

§url: RelayUrl

The [RelayUrl] where this relay server can be dialed.

+

Fields§

§url: RelayUrl

The RelayUrl where this relay server can be dialed.

§stun_only: bool

Whether this relay server should only be used for STUN requests.

This essentially allows you to use a normal STUN server as a relay node, no relay functionality is used.

diff --git a/pr/3069/docs/src/iroh/magicsock/relay_actor.rs.html b/pr/3069/docs/src/iroh/magicsock/relay_actor.rs.html index 0bac624f2e..f2e31f0ff4 100644 --- a/pr/3069/docs/src/iroh/magicsock/relay_actor.rs.html +++ b/pr/3069/docs/src/iroh/magicsock/relay_actor.rs.html @@ -1390,9 +1390,9 @@ } ActiveRelayMessage::CheckConnection(local_ips) => { if let Some(fut) = self.handle_check_connection(local_ips).await { - if ping_future.is_none() { - ping_future.as_mut().set_future(fut); - } + // We always override the future, to make sure the latest connection + // details are used. + ping_future.as_mut().set_future(fut); } } ActiveRelayMessage::Shutdown => {