Package netstat helps you query open network connections.
import"github.com/bastjan/netstat"// Query open tcp socketsnetstat.TCP.Connections() // Query open udp sockets for ipv6 connectionsnetstat.UDP6.Connections()See netstat_tulpen.go for a more throughout example.
This library is v1 and follows SemVer.
No breaking changes will be made to exported APIs before v2.0.0.
There is currently no support planned for MacOS or *BSD without procfs support.