14 releases

0.5.5 Sep 3, 2024
0.5.4 Jul 22, 2024
0.5.2 Jun 7, 2024
0.4.1 Aug 20, 2023
0.1.0 Nov 14, 2021

#767 in Network programming

Download history 195313/week @ 2024-06-13 251588/week @ 2024-06-20 326864/week @ 2024-06-27 336536/week @ 2024-07-04 385064/week @ 2024-07-11 416203/week @ 2024-07-18 460654/week @ 2024-07-25 465865/week @ 2024-08-01 508341/week @ 2024-08-08 498027/week @ 2024-08-15 530855/week @ 2024-08-22 552276/week @ 2024-08-29 583299/week @ 2024-09-05 511210/week @ 2024-09-12 551415/week @ 2024-09-19 490134/week @ 2024-09-26

2,246,245 downloads per month
Used in 805 crates (8 directly)

MIT/Apache

66KB
1.5K SLoC

Uniform interface to send and receive UDP packets with advanced features useful for QUIC

This crate exposes kernel UDP stack features available on most modern systems which are required for an efficient and conformant QUIC implementation. As of this writing, these are not available in std or major async runtimes, and their niche character and complexity are a barrier to adding them. Hence, a dedicated crate.

Exposed features include:

  • Segmentation offload for bulk send and receive operations, reducing CPU load.
  • Reporting the exact destination address of received packets and specifying explicit source addresses for sent packets, allowing responses to be sent from the address that the peer expects when there are multiple possibilities. This is common when bound to a wildcard address in IPv6 due to RFC 8981 temporary addresses.
  • Explicit Congestion Notification, which is required by QUIC to prevent packet loss and reduce latency on congested links when supported by the network path.
  • Disabled IP-layer fragmentation, which allows the true physical MTU to be detected and reduces risk of QUIC packet loss.

Some features are unavailable in some environments. This can be due to an outdated operating system or drivers. Some operating systems may not implement desired features at all, or may not yet be supported by the crate. When support is unavailable, functionality will gracefully degrade.

Dependencies

~0.6–8.5MB
~72K SLoC