Skip to content
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

send_to and recv_from methods utilizing associated SENDMSG and RE… #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jamwt
Copy link

@jamwt jamwt commented Feb 1, 2021

…CVMSG ops.

Includes an example udp echo program to demonstrate usage.

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.

…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.
@CLAassistant
Copy link

CLAassistant commented Feb 1, 2021

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants