pub struct OpenSessionParams {
pub peer: String,
pub service: String,
pub idle_timeout_secs: Option<u64>,
}Expand description
Params of Request::OpenSession: the peer/service target to dial. Both fields are
defaultable — an empty target simply fails the dial (a clean -32055 error).
Fields§
§peer: String§service: String§idle_timeout_secs: Option<u64>A QUIC idle timeout for THIS session only, in seconds (#166, api_minor >= 54).
Absent inherits [network].idle_timeout_secs, i.e. today’s behaviour. 0 means “no idle
timeout from this side” — the same meaning the node-wide knob gives it, so the two cannot be
read differently.
Only LOWERING is unilateral. QUIC negotiates max_idle_timeout to the MINIMUM of the
two peers’ values (RFC 9000 §10.1), so this can always make a session die sooner when it
goes quiet and can never make it outlive what the peer allows. Raising needs both peers
configured — which was already true of the node-wide knob, and which no per-connection seam
changes.
Outbound only, and that is not half a feature. An accepted session uses the node-wide value, because iroh gives the server config no per-connection seam — but the direction that CAN work one-sidedly is available here, and the direction that cannot never worked anywhere. A node wanting a shorter timeout on a session it did not initiate can dial instead.
Ignored on a RACING dial, because that opens connections it then abandons. The precise rule, since the first version of this sentence was wrong in both directions:
- A roster person races whenever the roster lists them with ANY device — including
exactly one — so a
user_idnaming a rostered person never gets it. - A pairing-mode
b64u:races only with TWO OR MORE stored devices; with exactly one it falls through to the single-entry path and DOES get it.
The node logs at warn! when it drops the value, naming the peer — a caller cannot know how
many devices a peer has, so a silent drop would be unattributable. Name one device with
eid: to be certain.
No per-connection KEEPALIVE: iroh caps the per-path keepalive at 5s and discards larger values, so one could only make pings more frequent — the node-wide knob already refuses that direction (#56).
Trait Implementations§
Source§impl Clone for OpenSessionParams
impl Clone for OpenSessionParams
Source§fn clone(&self) -> OpenSessionParams
fn clone(&self) -> OpenSessionParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more