Open joshtriplett opened 4 years ago
We don't support vectored send/recv on UdpSocket either currently - PRs welcome for both!
@sfackler Makes sense; UdpSocket
filed separately as https://github.com/rust-lang/rust/issues/68617.
I have just added vectored send for send
in https://github.com/rust-lang/rust/pull/69915 . It seems that we don't have binding for sendmsg
from libc.
The
UnixDatagram
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.Given that
UnixDatagram
only runs on UNIX, wherewritev
works just fine on a socket, such an operation could usewritev
; alternatively, this could usesendmsg
, which supports supplying an iovec.sendmsg
would also allow a vectoredsend_to
operation.