pub async fn serve_session<B, N, H, S, K>(
pipeline: &Pipeline<B, N, H>,
principal: Principal,
src: &mut S,
sink: &mut K,
cfg: &SessionConfig,
) -> SessionEndExpand description
Serve one ssh-frame session: the handshake, then one verb per top-level
frame until Close, a clean end of stream, a protocol error or a
failure. Each verb runs on pipeline as principal.
The pipeline must be configured with AuthMode::TransportIdentity:
the transport has already authenticated the peer, and no replay record
or quota is written. Any other mode ends the session at once with
SessionEnd::ProtocolError, before reading a frame. Its upload
limits should be super::upload_limits.
Responses and error frames are mkit serve’s, byte for byte
(rust/tests/golden/ssh-serve/).