sk-matrix-project/app/wails/pkg/system/network.go

14 lines
293 B
Go
Raw Normal View History

2023-07-09 23:04:17 +08:00
package system
import "github.com/shirou/gopsutil/net"
2023-07-15 23:29:03 +08:00
func (i *InfoUtils) GetNetWorkConnection() []net.ConnectionStat {
2023-07-09 23:04:17 +08:00
info, _ := net.Connections("all")
return info
}
2023-07-19 16:07:35 +08:00
func (i *InfoUtils) GetNetworkCounter(all bool) []net.IOCountersStat {
info, _ := net.IOCounters(!all)
return info
}