pub async fn protocol<S: AsyncReadExt + AsyncWriteExt + Unpin>(
    stream: S
) -> Result<(S, Protocol), ProtocolNegotiationError>
Expand description

Negotiate a protocol version to use.