tailscale / go

Tailscale's rolling temporary fork of Go with emphasis on performance and memory/binary size reduction. We try to upstream everything and keep this repo's diff small.
https://github.com/tailscale/go/commits
BSD 3-Clause "New" or "Revised" License
66 stars 6 forks source link

[tailscale] net: add TCP socket creation/close hooks to SockTrace API #59

Closed mihaip closed 1 year ago

mihaip commented 1 year ago

Extends the hooks added by #45 to also expose when TCP sockets are created or closed (meant to allow TCP stats to be read from them). We don't do this for all socket types since stats are not available for UDP sockets, and they tend to be short-lived, thus invoking the hooks would be useless overhead.

Also fixes read/write hooks to not count out-of-band data, since that's usually not sent over the wire.

Updates tailscale/corp#9230 Updates #58