Skip to content

Comment on We have ipinfo at home or how to geolocate IPs in your CLI using latency

Comments

It'd be clever to integrate this into the TCP stack so it tells you immediately what the lowest bound is on the distance to the counterparty based on the time between data sent and the corresponding acknowledgements. I can see some immediate applications for that.

You can get tcp measured round trip time from tcp_info with

   struct tcp_info info;
   socklen_t len = sizeof(info);
   getsockopt(sock, IPPROTO_TCP, TCP_INFO, &info, &len);
tcp_info varies by OS and version, but I think tcpi_rtt is well supported.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.