network

package
v0.0.0-...-2f8fb7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRate

func GetRate(ip string) (AvgRate float64, Total float64)

GetRate 获取指定IP的平均速率和总流量,AvgRate 平均速率(单位为KB/s),Total 总量(单位为MB)

func GetRateMb

func GetRateMb(ip string) (AvgRate float64, Total float64)

GetRateMb 获取指定IP的平均速率和总流量,AvgRate 平均速率(单位为MB/s),Total 总量(单位为GB)

func StartGetNetworkRate

func StartGetNetworkRate() (*pcap.Handle, error)

Types

type TrafficStat

type TrafficStat struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL