You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filing this based on the discussions starting at #152 (comment) . I don't plan to write this support myself, but if it existed I'd be thrilled to use it.
To support splitting without that, we could have a native function WebSocketStream::split() returning a WebSocketSender that has the send function, and a WebSocketReceiver that implements Stream. If the sink feature is enabled, WebSocketSender can implement Sink.
With that support, ByteReader can continue to always expect a Stream. ByteWriter can support any Sink if the sink feature is enabled, or support onlyWebSocketStream and WebSocketSender otherwise (using a sealed trait).
The text was updated successfully, but these errors were encountered:
Filing this based on the discussions starting at #152 (comment) . I don't plan to write this support myself, but if it existed I'd be thrilled to use it.
Currently, splitting a
WebSocketStream
into a write and read side requiresSink
support andfutures_util::stream::StreamExt::split
.To support splitting without that, we could have a native function
WebSocketStream::split()
returning aWebSocketSender
that has thesend
function, and aWebSocketReceiver
that implementsStream
. If the sink feature is enabled,WebSocketSender
can implementSink
.With that support,
ByteReader
can continue to always expect aStream
.ByteWriter
can support anySink
if the sink feature is enabled, or support onlyWebSocketStream
andWebSocketSender
otherwise (using a sealed trait).The text was updated successfully, but these errors were encountered: