Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunSpeedTest ¶
func RunSpeedTest()
Types ¶
type BytesPerTime ¶
type SpeedTest ¶
type SpeedTest struct {
Result SpeedTestResult
ReportChan chan BytesPerTime
Connection net.Conn
StatusChan chan SpeedTestStatus
DataStreamChan chan BytesPerTime // The raw stream used to report bytes per time on each send of bytes.
ControlChan chan SpeedTestControl
TestComplete bool
Direction Direction
Duration int
}
func (*SpeedTest) ReceiveData ¶
func (*SpeedTest) SpeedAggregator ¶
func (sp *SpeedTest) SpeedAggregator()
type SpeedTestControl ¶
type SpeedTestControl int
const ( ControlStart SpeedTestControl = iota ControlStop ControlAbort )
type SpeedTestResult ¶
type SpeedTestResult struct {
Duration time.Duration
BytesTransferred uint
AverageSpeed uint
PeakSpeed uint
InitialPing *ping.Statistics
DuringPing *ping.Statistics
AfterPing *ping.Statistics
BufferBloat uint // Buffer bloat in ms
}
type SpeedTestStatus ¶
Click to show internal directories.
Click to hide internal directories.