Documentation
¶
Index ¶
Constants ¶
View Source
const ( // RawNoJSON NDT tests correspond to the code integrated into the uTorrent client. RawNoJSON = ServerType(iota) // RawJSON NDT tests correspond to code that integrated web100clt anytime after 2016. RawJSON // WS NDT tests take place over unencrypted websockets. WS // WSS NDT tests take place over encrypted websockets. WSS )
Variables ¶
This section is empty.
Functions ¶
func MakeNdtUpgrader ¶
MakeNdtUpgrader creates a websocket Upgrade for the NDT legacy
Types ¶
type Config ¶
type Config struct {
KeyFile, CertFile string
ServerType ServerType
}
Config expresses the configuration of the server, and whether to use TLS or not.
type ServerType ¶
type ServerType int
ServerType indicates what type of NDT test the particular server is performing. There are extant active clients for each of these protocol variations.
type TestResponder ¶
type TestResponder struct {
Port int
Ln net.Listener
S *http.Server
Ctx context.Context
Cancel context.CancelFunc
Config *Config
}
TestResponder coordinates synchronization between the main control loop and subtests.
func (*TestResponder) Close ¶
func (tr *TestResponder) Close()
Close will shutdown, cancel, or close all resources used by the test.
func (*TestResponder) StartAsync ¶
func (tr *TestResponder) StartAsync(mux *http.ServeMux, rawTest func(protocol.MeasuredConnection), msg string) error
StartAsync allocates a new TLS HTTP server listening on a random port. The server can be stopped again using TestResponder.Close().
Click to show internal directories.
Click to hide internal directories.