Repository navigation
Add UdpSocket to the reactor - #18
Merged
Merged
Conversation
added 3 commits
September 29, 2026 02:04
net::UdpSocket: bind, bind_reuse_addr, from_socket, local_addr, recv/send buffer sizes, and poll_recv_from/recv_from, poll_send_to/send_to. recvfrom writes straight into the caller's slice: no internal buffer, no allocation per datagram. Same readiness discipline as TcpStream: one waker per direction, so one task can receive while another sends.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
nagoya::net::UdpSocket(re-exported fromnagoya::reactor), needed by the pays.online shred watcher, which receives Solana gossip and Turbine shreds over UDP.bind/bind_reuse_addr/from_socket,local_addr,set_recv_buffer/set_send_bufferpoll_recv_from/recv_from,poll_send_to/send_torecvfromwrites into the caller's slice, with no internal buffer and no allocation per datagramrecvmmsgbatching yet; one datagram per call on every target.Second commit bumps to 0.1.15, which publishes on merge.
Verified on macOS (kqueue):
cargo test --features reactorall pass (10 in reactor_net, including the new UDP tests);cargo check --no-default-featurespasses;cargo clippy --features reactor --all-targetshas no warnings. Linux (epoll) runs in CI.