-
Notifications
You must be signed in to change notification settings - Fork 237
feat(iroh): Make poll_writable
precise by using NodeMap::addr_for_send
#3266
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
base: main
Are you sure you want to change the base?
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3266/docs/iroh/ Last updated: 2025-05-20T15:12:46Z |
This PR:
Latest PR to main:
|
I guess it clearly makes a difference? 😅 |
Don't think I'll merge this near-term. |
1c22b91
to
19dfdb5
Compare
This PR after rebasing on
|
For now just a PR to look at netsim numbers.
Description
Every send side of a connection gets its own
UdpPoller
.If we pass in the
Connection::remote_address()
toAsyncUdpSocket::create_io_poller
in quinn (n0-computer/quinn#57) then we can determine which path we're going to use intry_send
viaNodeMap::addr_for_send
withinIoPoller::poll_writable
.This allows us to accurately (ignoring race conditions between
try_send
andpoll_writable
) report readiness.Notes & open questions
Needs changes to quinn's
AsyncUdpSocket
trait.It's possible to circumvent them, but it's verrrry annoying to do so.
(The trick would be to wrap calls to
quinn::Endpoint::connect_with
andquinn::Incoming::accept[_with]
with a lock and pre-load the remote address somewhere so thatMagicSock::create_io_poller
can fetch it back when it's called throughconnect_with
/accept[_with]
. I couldn't get that to work easily without panicing 😬 )Change checklist