#udp-socket #udp #sockets #unix #async #linux

unix-udp-sock

async & sync UDP sockets supporting sendmsg/recvmsg and src IP manipulation

9 releases (breaking)

0.7.1 Apr 21, 2024
0.7.0 May 1, 2023
0.6.1 Mar 10, 2023
0.6.0 Nov 5, 2022
0.2.0 Jul 25, 2022

#1231 in Network programming

Download history 6/week @ 2024-02-19 12/week @ 2024-02-26 10/week @ 2024-03-04 12/week @ 2024-03-11 25/week @ 2024-04-01 211/week @ 2024-04-15 55/week @ 2024-04-22

291 downloads per month

MIT/Apache

69KB
1.5K SLoC

unix-udp-sock

Largely based on quinn-udp, this adds async & sync support for additional syscalls:

UDP socket send:

UDP socket recv:

In addition, Transmits has been altered to support Vec<u8>/[u8]/Bytes/BytesMut.

We can also select which interface to use with src_ip: Some(Source::Interface(idx)). You must know the index of the interface to use this.


lib.rs:

Uniform interface to send/recv UDP packets with ECN information.

Dependencies

~3–15MB
~123K SLoC