Documentation ¶
Overview ¶
wifibytes is a package for calculating the number of kilobits per seconds are going over a given network interface.
client, err := wifibytes.NewClient(10, "wlp2s0") if err != nil { // handle error } down, up, err := client.GetKilobitsPerSecond() if err != nil { // handle error } // We now have download speed and upload speed
wifi bytes is a package for examing how many bytes are being transmitted over a wireless network interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient returns a new client ready for reading numReads is how big the user wishes the buffer of previous data points to be.
func (*Client) GetKilobitsPerSecond ¶
GetKilobitsPerSecond will return the number of kilobits per second which are currently going over the network interface. The caller is expected to know how big the internal buffer and how long between calls are used.
Click to show internal directories.
Click to hide internal directories.