send_to and recv_from methods utilizing associated SENDMSG and RE…#41
Open
jamwt wants to merge 2 commits intospacejam:masterfrom
Open
send_to and recv_from methods utilizing associated SENDMSG and RE…#41jamwt wants to merge 2 commits intospacejam:masterfrom
send_to and recv_from methods utilizing associated SENDMSG and RE…#41jamwt wants to merge 2 commits intospacejam:masterfrom
Conversation
…CVMSG ops.
A couple of structural changes to enable this:
1. Instead of a simple io_uring_cqe as the only result on successful execution
of the entry, we also passthrough any address information that was written
to the `msghdr`. This lets us convert these results into `SocketAddr` on sessionless
transforts, like UDP. The `in_flight` system keeps an array of `Option<SocketAddr>`
to act as the storage location for these socket addresses when necessary.
2. Instead of a bool for if the `with_cqe` method should use a `msghdr`, an enum
is now used to allow the specification of an address that should be copied into
this `msghdr` in addition to just `iovec` information. This is so that `send_to`/`SENDMSG`
operations without an implicit peer can know the delivery destination of the
datagram.
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.
…CVMSG ops.
Includes an example udp echo program to demonstrate usage.
A couple of structural changes to enable this:
Instead of a simple io_uring_cqe as the only result on successful execution
of the entry, we also passthrough any address information that was written
to the
msghdr. This lets us convert these results intoSocketAddron sessionlesstransforts, like UDP. The
in_flightsystem keeps an array ofOption<SocketAddr>to act as the storage location for these socket addresses when necessary.
Instead of a bool for if the
with_cqemethod should use amsghdr, an enumis now used to allow the specification of an address that should be copied into
this
msghdrin addition to justiovecinformation. This is so thatsend_to/SENDMSGoperations without an implicit peer can know the delivery destination of the
datagram.