ndt

package
v0.13.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WS    = ConnectionType("WS")
	WSS   = ConnectionType("WSS")
	Plain = ConnectionType("PLAIN")
)

The types of connections we support.

Functions

This section is empty.

Types

type ConnectionType

type ConnectionType string

ConnectionType records whether this test is performed over plain TCP, websockets, or secure websockets.

func (ConnectionType) String

func (c ConnectionType) String() string

type Server

type Server interface {
	SingleMeasurementServerFactory
	ConnectionType() ConnectionType
	DataDir() string
	LoginCeremony(protocol.Connection) (int, error)
}

Server describes the methods implemented by every server of every connection type.

type SingleMeasurementServer

type SingleMeasurementServer interface {
	Port() int
	ServeOnce(context.Context) (protocol.MeasuredConnection, error)
	Close()
}

SingleMeasurementServer is the interface implemented by every single-serving server. No matter whether they use WSS, WS, TCP with JSON, or TCP without JSON.

type SingleMeasurementServerFactory

type SingleMeasurementServerFactory interface {
	SingleServingServer(direction string) (SingleMeasurementServer, error)
}

SingleMeasurementServerFactory is the method by which we abstract away what kind of server is being created at any given time. Using this abstraction allows us to use almost the same code for WS and WSS.

Jump to

Keyboard shortcuts

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