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.
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.
Click to show internal directories.
Click to hide internal directories.