server

package
v0.0.0-...-0ea8511 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientRegisterer

type ClientRegisterer interface {
	// Register registers a new client and returns the ID.
	Register() string
}

ClientRegisterer is the interface implemented by types that register clients.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is an HTTP server.

func NewServer

func NewServer(port, host string, cr ClientRegisterer) (s *Server, err error)

NewServer returns an HTTP server configured to run on the given host and port.

func (*Server) Close

func (s *Server) Close() error

Close closes the HTTP server.

func (*Server) Serve

func (s *Server) Serve() error

Serve accepts incoming connections.

Jump to

Keyboard shortcuts

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