Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultMeasurer ¶
type DefaultMeasurer struct{}
DefaultMeasurer is the default ndt8 measurer that wraps the measurer package's Start function.
func (*DefaultMeasurer) Start ¶
func (*DefaultMeasurer) Start(ctx context.Context, c net.Conn) <-chan model.Measurement
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
Protocol is the implementation of the ndt8 protocol.
func New ¶
New returns a new Protocol with the specified connection and every other option set to default.
func (*Protocol) ReceiverLoop ¶
func (p *Protocol) ReceiverLoop(ctx context.Context) (<-chan model.WireMeasurement, <-chan model.WireMeasurement, <-chan error)
ReceiverLoop starts the receiver loop of the ndt8 protocol. The context's lifetime determines how long to run for. It returns one channel for sender-side measurements, one channel for receiver-side measurements and one channel for errors. While the measurements channels could be ignored, the errors channel MUST be drained by the caller.
func (*Protocol) SenderLoop ¶
func (p *Protocol) SenderLoop(ctx context.Context) (<-chan model.WireMeasurement, <-chan model.WireMeasurement, <-chan error)
SenderLoop starts the send loop of the ndt8 protocol. The context's lifetime determines how long to run for. It returns one channel for sender-side measurements, one channel for receiver-side measurements and one channel for errors. While the measurements channels could be ignored, the errors channel MUST be drained by the caller.