server

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented = fmt.Errorf("Error: Not Implemented\n")
)
View Source
var (
	// Router ...
	Router = pat.New()
)

Functions

func GenerateHandlers

func GenerateHandlers() map[string]core.HandleFunc

GenerateHandlers ...

func GetPort added in v0.1.1

func GetPort(lis net.Listener) (uint32, error)

GetPort return the port number of a listener

func Register

func Register(name string, auth handleFunc)

Register registers a new pubsub server

func Start

func Start(uris []string) error

Start attempts to individually start servers from a list of provided listeners; the listeners provided is a comma delimited list of uri strings (scheme:[//[user:pass@]host[:port]][/]path[?query][#fragment])

func StartHTTP

func StartHTTP(uri string, errChan chan<- error)

StartHTTP starts a mist server listening over HTTP

func StartTCP

func StartTCP(uri string, errChan chan<- error)

StartTCP starts a tcp server listening on the specified address (default 127.0.0.1:1445) and then continually reads from the server handling any incoming connections

func StartTCPWithLS added in v0.1.1

func StartTCPWithLS(ls net.Listener, errChan chan<- error, ctx context.Context)

StartTCPWithLS starts a tcp server listening on the specified tcp listener and then continually reads from the server handling any incoming connections

func StartWS

func StartWS(uri string, errChan chan<- error)

StartWS starts a core server listening over a websocket

func StartWithLS added in v0.1.1

func StartWithLS(ls net.Listener, ctx context.Context) error

StartWithLS attempts to individually start servers from a TCP listeners

Types

This section is empty.

Jump to

Keyboard shortcuts

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