-
Notifications
You must be signed in to change notification settings - Fork 9
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
Simplify #24
base: master
Are you sure you want to change the base?
Conversation
That's the only case I remember using it too. It was for automatically chipping in ping-pong messages to keep the connection alive. I guess we can just remove it and let high-level code handle these. |
How about let us merge this and deal with downstream usage later? |
Actually, tink_io seems quite deeply affected by this. Need to resolve at least #27 to move forward. |
About websocket blend stream, the idea was that the incoming stream which can contain both signalling messages (ping/pong) and user messages is split into two streams respectively. For the signalling stream it is supposed to be handled internally by the framework i.e. auto ping pong. While the user message stream is passed to developer. In this particular use case, the blended stream is actually eager because it is eagerly consumed and piped into the wire. I guess we can live without blended stream, by simply consuming the two streams individually? |
This is still missing quite a few things (implicit casts and regrouping), but it vastly improves performance for synchronous streams and fixes #20 in the process.
It also makes stream iteration consistently lazy and suspendable.
Which brings me to my main question: what to do with blending? I don't fully understand the use case. It introduces a temporal component that can only be conserved if the blended stream is eager. The only usage I found was tink_websocket, to blend in the pongs in the
TcpConnector
, but I wonder if there are others.