#[non_exhaustive]pub struct ConnectOptions {
pub token: Option<String>,
pub path: Option<String>,
pub cost: Option<u64>,
pub quic: ConnectOptions,
}Expand description
How to dial a peer with Node::connect_with.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.token: Option<String>A token to present, sent in the MoQ SETUP and as ?jwt= in the setup path.
The accepting node reads it as SessionRequest::token.
path: Option<String>The path the SETUP requests, without a query.
The accepting node reads it as SessionRequest::path. None requests
the root.
cost: Option<u64>The cost added to every route learned over this link.
None keeps moq’s default of one.
quic: ConnectOptionsiroh’s options for the QUIC dial.
Set a transport config here to dial with another
Congestion controller. The default keeps the
endpoint’s transport config, which runs BBR3 under
MoqPreset. It applies to a direct dial only: a
session that already exists keeps its connection, so close it first to
dial again with other options. A relay link ignores it.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn with_token(self, token: impl Into<String>) -> Self
pub fn with_token(self, token: impl Into<String>) -> Self
Returns these options with token presented to the peer.
Sourcepub fn with_path(self, path: impl Into<String>) -> Self
pub fn with_path(self, path: impl Into<String>) -> Self
Returns these options with path requested in the SETUP.
Sourcepub fn with_cost(self, cost: u64) -> Self
pub fn with_cost(self, cost: u64) -> Self
Returns these options with cost added to every route learned over the link.
Sourcepub fn with_quic(self, quic: ConnectOptions) -> Self
pub fn with_quic(self, quic: ConnectOptions) -> Self
Returns these options with iroh’s quic options for the dial.