Open mattsse opened 3 weeks ago
hey! Would love to work on this 🫡
hey! Would love to work on this 🫡
assigned !
I made a draft for the issue #12417
But @mattsse I've still got few questions 😄
In my PR I only managed the case where there's one ping that needs to be saved (waiting to be sent). Is there any real case scenario where multiple pings would need to be saved? For example a ping and pong? Maybe it should be an array of saved pings?
It was not described in the PR description, but I also needed to handle disconnect, but unfortunately, I don't think I managed to do it 1/1 to the original version.
Since we don't have access to the buffer anymore, we cannot clear the messages that are waiting to be sent. Maybe it's already handled by the inner Sink?
Right now I'm just sending a disconnect message, and in poll_flush
, treating it as a priority.
But let me know what's the best way 🫡
In my PR I only managed the case where there's one ping that needs to be saved (waiting to be sent). Is there any real case scenario where multiple pings would need to be saved?
we can ignore this case and only consider one pending ping/pong at a time
Right now I'm just sending a disconnect message, and in poll_flush, treating it as a priority.
that makes sense and fits how flush is supposed to work
Describe the feature
we currently have a buffer:
https://github.com/paradigmxyz/reth/blob/ff9a42ae8fbf441f4fb9ca8dcea84c765b284721/crates/net/eth-wire/src/p2pstream.rs#L244-L245
TODO
also ptal at the Sink docs if unfamiliar with the Sink API
Additional context
No response