pub struct ClientLink { /* private fields */ }Expand description
One authenticated server link.
The first five methods are the whole transport surface the runloop uses, so a change of transport touches this struct alone. The remaining two read the supervision state of the connection the handle keeps across redials.
Implementations§
Source§impl ClientLink
impl ClientLink
Sourcepub async fn connect(
init: &ClientInit,
live_sessions: Vec<LiveSession>,
) -> Result<Self, NetError>
pub async fn connect( init: &ClientInit, live_sessions: Vec<LiveSession>, ) -> Result<Self, NetError>
Dial, verify the certificate pin, sign the server challenge, then read
the role slice with hello.
Sourcepub async fn authenticate(
&self,
live_sessions: Vec<LiveSession>,
) -> Result<(), NetError>
pub async fn authenticate( &self, live_sessions: Vec<LiveSession>, ) -> Result<(), NetError>
Send the routed hello again on the connection this link now holds.
The net layer redials on its own, and a fresh connection carries no role binding until this frame lands, so a caller replays it whenever readiness returns (plan §7 line 310).
Sourcepub async fn request(&self, op: ClientOp) -> Result<ResBody, NetError>
pub async fn request(&self, op: ClientOp) -> Result<ResBody, NetError>
Send one request frame and answer with its body. A refusal from the server arrives inside the body, which keeps the retry decision in the intent machine.
Sourcepub fn readiness(&self) -> ConnReadiness
pub fn readiness(&self) -> ConnReadiness
Liveness of the connection behind this link.