pub async fn send_ping<S>(stream: S) -> Result<(S, Duration)> where S: AsyncRead + AsyncWrite + Unpin,
Sends a ping and waits for the pong.