Documentation
¶
Overview ¶
Package server implements the DASH server
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 to save measurements
Datadir string
// Logger is the logger to use. This field is initialized by the
// NewHandler constructor to a do-nothing logger.
Logger model.Logger
// contains filtered or unexported fields
}
Handler is the DASH handler
func NewHandler ¶
NewHandler creates a new handler instance
func (*Handler) CountSessions ¶
CountSessions return the number of active sessions
func (*Handler) JoinReaper ¶
func (h *Handler) JoinReaper()
JoinReaper blocks until the reaper has terminated
func (*Handler) RegisterHandlers ¶
RegisterHandlers registers handlers for the URLs used by the DASH experiment. The following prefixes are registered:
- /negotiate/dash - /dash/download - /collect/dash
The /negotiate/dash prefix is used to create a measurement context for a dash client. The /download/dash prefix is used by clients to request data segments. The /collect/dash prefix is used to submit client measurements.
func (*Handler) StartReaper ¶
StartReaper starts the reaper goroutine that makes sure that we write back results of incomplete measurements. This goroutine will terminate when the |ctx| context becomes expired.