pub(super) async fn end<T>(
writer: JoinHandle<Option<SplitSink<WebSocketStream<ClientIo<T>>, Message>>>,
written: &Activity,
messages: SplitStream<WebSocketStream<ClientIo<T>>>,
end: End,
)where
T: AsyncRead + AsyncWrite + Unpin,Expand description
End a WebSocket session once its writer, which sends the close of the
server, got the rest out, see join_or_abort. What comes after depends
on how it ended, see End.