handler

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Overview

Package handler implements the WebSocket handler for ndt7.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// DataDir is the directory where results are saved.
	DataDir string
	// SecurePort should contain the port used for secure, WSS tests.
	SecurePort string
	// InsecurePort should contain the port used for insecure, WS tests.
	InsecurePort string
	// ServerMetadata contains deployment-specific metadata.
	ServerMetadata []metadata.NameValue
	// CompressResults controls whether the result files saved by the server are compressed.
	CompressResults bool
	// Events is for reporting new connections to the event server.
	Events eventsocket.Server
}

Handler handles ndt7 subtests.

func (*Handler) Download

func (h *Handler) Download(rw http.ResponseWriter, req *http.Request)

Download handles the download subtest.

func (*Handler) Upload

func (h *Handler) Upload(rw http.ResponseWriter, req *http.Request)

Upload handles the upload subtest.

Jump to

Keyboard shortcuts

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