light

package
v0.0.0-...-4950795 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MeasurementPacket

type MeasurementPacket struct {
	Sequence            uint32
	Timestamp           common.TwampTimestamp
	ErrorEstimate       uint16
	MBZ                 uint16
	ReceiveTimeStamp    common.TwampTimestamp
	SenderSequence      uint32
	SenderTimeStamp     common.TwampTimestamp
	SenderErrorEstimate uint16
	Mbz                 uint16
	SenderTtl           byte
}

type TwampLightClient

type TwampLightClient struct{}

func NewLightClient

func NewLightClient() *TwampLightClient

func (*TwampLightClient) Connect

func (c *TwampLightClient) Connect(hostname string, port int) (*TwampLightConnection, error)

type TwampLightConnection

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

func NewTwampLightConnection

func NewTwampLightConnection(hostname string, port int) *TwampLightConnection

func (*TwampLightConnection) Close

func (c *TwampLightConnection) Close()

func (*TwampLightConnection) CreateLightSession

func (c *TwampLightConnection) CreateLightSession(config common.TwampSessionConfig) (*TwampLightSession, error)

type TwampLightSession

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

func (*TwampLightSession) CreateTest

func (s *TwampLightSession) CreateTest() (*TwampLightTest, error)

func (*TwampLightSession) GetConfig

func (*TwampLightSession) Stop

func (s *TwampLightSession) Stop()

type TwampLightTest

type TwampLightTest struct {
	Session    *TwampLightSession
	Connection *net.UDPConn
	Sequence   uint32
}

TWAMP test connection used for running TWAMP tests.

func (*TwampLightTest) FormatJSON

func (t *TwampLightTest) FormatJSON(r *common.PingResults)

func (*TwampLightTest) GetConnection

func (t *TwampLightTest) GetConnection() *net.UDPConn

Get TWAMP Test UDP connection.

func (*TwampLightTest) GetLocalTestHost

func (t *TwampLightTest) GetLocalTestHost() string

Get the local IP address for the TWAMP control Session.

func (*TwampLightTest) GetRemoteTestHost

func (t *TwampLightTest) GetRemoteTestHost() string

Get the remote IP address for the TWAMP control Session.

func (*TwampLightTest) GetRemoteTestPort

func (t *TwampLightTest) GetRemoteTestPort() int

Get the remote TWAMP UDP port number.

func (*TwampLightTest) GetSession

func (t *TwampLightTest) GetSession() *TwampLightSession

Get the underlying TWAMP control Session for the TWAMP test.

func (*TwampLightTest) Ping

func (t *TwampLightTest) Ping(count int, isRapid bool, interval int) *common.PingResults

func (*TwampLightTest) RemoteAddr

func (t *TwampLightTest) RemoteAddr() (*net.UDPAddr, error)

Get the remote TWAMP IP/UDP address.

func (*TwampLightTest) ReturnJSON

func (t *TwampLightTest) ReturnJSON(r *common.PingResults) string

func (*TwampLightTest) Run

func (t *TwampLightTest) Run() (*common.TwampResults, error)

Run a TWAMP test and return a pointer to the TwampResults.

func (*TwampLightTest) RunX

func (t *TwampLightTest) RunX(count int, callback common.TwampTestCallbackFunction, doneSignal chan bool) *common.PingResults

func (*TwampLightTest) SetConnection

func (t *TwampLightTest) SetConnection(connection *net.UDPConn)

Jump to

Keyboard shortcuts

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