-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a ByteWriter
wrapper that implements AsyncWrite
for a Sink<Message>
#152
Conversation
Also, as a design note: this is built around If you want |
…essage>` This is useful for programs that want to treat a WebSocket as a stream of bytes.
1bf3aa8
to
af99b1d
Compare
How would such a native
That seems easy to add here directly. Can you do that? |
Something along the lines of I think I can make this implementation forward-compatible with being able to do that.
Sure; just wanted to review the basic design with you first. |
Sounds like a good plan to me. And |
Right. And if the sink feature is enabled, |
OK, I've added a commit implementing As far as I can tell, this design is forward-compatible with supporting |
Looks good to me. You'd do the |
@sdroege I'm working on Less confident in adding a native split; we'll see how that goes. (Aside: Having to write |
This is useful for programs that want to treat a WebSocket as a stream
of bytes.
Additional bits that could be added in future PRs:
AsyncWrite
if tokio is enabledByteReader
to implementAsyncRead
for aStream<Item = Message>