server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Protocol   string
	Addr       string
	Verify     func(string, string) bool
	HTTPPath   string
	WSPath     string
	WSCompress bool
}

Config is the server configuration

type Server

type Server struct {
	Config    *Config
	TLSConfig *tls.Config
}

Server holds contexts of the server

func NewServer

func NewServer(protocol, addr string) *Server

NewServer creates a server

func (*Server) Serve

func (s *Server) Serve() error

Serve start the server

Jump to

Keyboard shortcuts

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