pub(super) async fn drain<T>(
sink: SplitSink<WebSocketStream<ClientIo<T>>, Message>,
messages: SplitStream<WebSocketStream<ClientIo<T>>>,
)where
T: AsyncRead + AsyncWrite + Unpin,Expand description
End a WebSocket whose client sent a message larger than the server
takes, once the close went out. The rest of the message cannot be read
as messages. The server stops writing and drops what the client still
sends until it ends the connection, for up to CLOSE_TIMEOUT and
DRAIN_LIMIT, on top of what got dropped while the close went out, see
Discard. A socket closed with input it did not read resets the
connection, which can drop the close and the status before it.