-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
UdpSocket: please support vectored send #68617
Comments
Support for method UdpSocket::send_to_vectored() would be really great If rustlib would provide this, the feature could be lifted to mio and further to tokio-UdpSocket |
Request for Comments: I need the functionality UdpSocket::send_to_vectored() in rustlib, then mio and finally in tokio::net To start with I did a first sketch in rustlib implementing UdpSocket::send_to_vectored() for unix. Please tell me, if this is heading into the right direction, I would add further code for other target systems, docs and tests If this functionality makes it into rustlib, then I will go another layer up in software stack, adding the functionality to mio. |
I'm concerned the proposed API has the problem where UDP datagrams tend to resist splitting-up by the protocol, so someone might use Anyways, please file an API Change Proposal. |
The
UdpSocket
type providessend
andsend_to
methods, but does not provide a vectored send operation. Such an operation is particularly helpful for datagrams, where separate send operations result in separate datagrams; a vectored send allows sending data from multiple buffers in a single datagram.This would require calling
sendmsg
, which supports supplying an iovec. (This should work on Windows as well.)The text was updated successfully, but these errors were encountered: