Skip to main content

Module serve

Module serve 

Source
Expand description

The front door a consumer walks through.

Everything here delegates. The point is that a consumer does not have to know that a Dispatcher exists, that a PeerSession needs a FeatureProfile resolved before the loop starts, or that ServeLoop::new takes seven arguments — none of which is a decision a consumer of this crate should have to make.

The one thing deliberately not hidden is the session’s ceiling. A profile is resolved from a revision, and until a peer says which revision it wants, something has to say what the session permits before the first frame. The StdioBuilder::version ceiling answers that, and it defaults to the newest revision this build can complete a handshake on rather than to a constant a consumer has to pick and remember to revisit.

Structs§

StdioBuilder
Builds a stdio server and serves it on this process’s stdin and stdout.