rust-lang / socket2

Advanced configuration options for sockets.
https://docs.rs/socket2
Apache License 2.0
682 stars 227 forks source link

Socket Timestamping Support #415

Open recatek opened 1 year ago

recatek commented 1 year ago

Windows and Linux both provide methods for retrieving the timestamp at which a packet was received by the system, which is pretty handy for anything involving clock synchronization or RTT calculation.

Windows documentation: https://learn.microsoft.com/en-us/windows/win32/winsock/winsock-timestamping Linux documentation: https://docs.kernel.org/networking/timestamping.html

It would be great if socket2 could implement support for gathering this data from its sockets, especially UDP sockets.

Thomasdezeeuw commented 1 year ago

Prs would be welcome.