pub struct HttpClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn new(url: impl Into<RelayUrl>) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn new(url: impl Into<RelayUrl>) -> Self
Create a new ClientBuilder
Sourcepub fn server_url(self, url: impl Into<RelayUrl>) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn server_url(self, url: impl Into<RelayUrl>) -> Self
Sets the server url
Sourcepub fn protocol(self, protocol: Protocol) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
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.
Sourcepub fn address_family_selector<S>(self, selector: S) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn address_family_selector<S>(self, selector: S) -> Self
Returns if we should prefer ipv6 it replaces the relayhttp.AddressFamilySelector we pass It provides the hint as to whether in an IPv4-vs-IPv6 race that IPv4 should be held back a bit to give IPv6 a better-than-50/50 chance of winning. We only return true when we believe IPv6 will work anyway, so we don’t artificially delay the connection speed.
Sourcepub fn can_ack_pings(self, can: bool) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn can_ack_pings(self, can: bool) -> Self
Enable this Client
to acknowledge pings.
Sourcepub fn is_preferred(self, is: bool) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn is_preferred(self, is: bool) -> Self
Indicate this client is the preferred way to communicate
to the peer with this client’s PublicKey
Sourcepub fn is_prober(self, is: bool) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn is_prober(self, is: bool) -> Self
Indicates this client is a prober
Sourcepub fn insecure_skip_cert_verify(self, skip: bool) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crateAvailable on test
or crate feature test-utils
only.
pub fn insecure_skip_cert_verify(self, skip: bool) -> Self
test
or crate feature test-utils
only.Skip the verification of the relay server’s SSL certificates.
May only be used in tests.
Sourcepub fn proxy_url(self, url: Url) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn proxy_url(self, url: Url) -> Self
Set an explicit proxy url to proxy all HTTP(S) traffic through.
Sourcepub fn build(
self,
key: SecretKey,
dns_resolver: DnsResolver,
) -> (Client, ClientReceiver)
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn build( self, key: SecretKey, dns_resolver: DnsResolver, ) -> (Client, ClientReceiver)
Build the Client
Sourcepub fn server_public_key(self, server_public_key: PublicKey) -> Self
👎Deprecated: This crate has been renamed from ‘iroh-net’ to ‘iroh’, please use the new crate
pub fn server_public_key(self, server_public_key: PublicKey) -> Self
The expected PublicKey
of the relay server we are connecting to.