Skip to main content

decide_frame

Function decide_frame 

Source
pub fn decide_frame(
    state: SessionState,
    frame: ClientFrame,
    keys: &Keys<'_>,
    standing: WelcomeFacts<'_>,
) -> SessionStep
Expand description

The whole session policy, as a pure function: which frames are legal when, and what a mismatch does. Tested without a socket, for the same reason decide_bind is.

A command that arrives before the hello is refused rather than queued: the peer has not yet shown that it speaks this wire, and running work for it would be trusting a stranger’s first sentence.