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

Create my own AsyncUdpSocket #1847

Closed
szguoxz opened this issue May 5, 2024 · 1 comment
Closed

Create my own AsyncUdpSocket #1847

szguoxz opened this issue May 5, 2024 · 1 comment

Comments

@szguoxz
Copy link

szguoxz commented May 5, 2024

I want to do something funny before the data hit quinn, so I am looking into AsyncUdpSocket.
for linux, I found send and recv is not symmetrical. For Send, we send out a transmit, but for Recv, we received a slice of IoSliceMut and RecvMeta.
Here is the structure of RecvMeta:
pub struct RecvMeta {
pub addr: SocketAddr,
pub len: usize,
pub stride: usize,
pub ecn: Option,
pub dst_ip: Option,
}
Just want to confirm that: info in every RecvMeta would be the same except: len and stride, right, after all, they are from the same transmit? Is it possible a recv will combine two transmit together? That's what I am trying to be sure.

For windows, it seems much simpler, you always only recv one recvmeta.

Thanks.

@Ralith
Copy link
Collaborator

Ralith commented May 5, 2024

AsyncUdpSocket presents a high-level interface around recvmmsg; refer to its documentation for specifics. There is no particular relationship to any specific group of transmit operations.

@Ralith Ralith closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
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

No branches or pull requests

2 participants