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

unix-udp-sock

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

11 releases (7 breaking)

0.8.0 Oct 30, 2024
0.7.2 Jul 15, 2024
0.7.1 Apr 21, 2024
0.7.0 May 1, 2023
0.2.0 Jul 25, 2022

#1270 in Network programming

Download history 1/week @ 2024-10-05 2/week @ 2024-10-12 213/week @ 2024-10-26 126/week @ 2024-11-02 664/week @ 2024-11-09 1420/week @ 2024-11-16 525/week @ 2024-11-23 1516/week @ 2024-11-30 558/week @ 2024-12-07 193/week @ 2024-12-14 101/week @ 2024-12-21 27/week @ 2024-12-28 457/week @ 2025-01-04 719/week @ 2025-01-11 1969/week @ 2025-01-18

3,194 downloads per month

MIT/Apache

77KB
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–11MB
~112K SLoC