pub async fn handshake<S: FrameSource, K: FrameSink>(
src: &mut S,
sink: &mut K,
server_id: &str,
) -> Result<(), SessionEnd>Expand description
The application handshake (SPEC-RPC §4): the first frame must be a
protocol-1 Hello, answered by a HelloResponse carrying server_id.
§Errors
SessionEnd::Timeout when the source times out; otherwise
SessionEnd::ProtocolError, after an error frame for a first frame
that is not Hello or names another protocol version, and silently
for an unreadable first frame or a failed HelloResponse write.