httpipe

package
v0.0.0-...-118d535 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server type is an http.Server type with pre-defined responses for *.js pages, *.json pages, and other pages

func NewHTTPipe

func NewHTTPipe() Server

NewHTTPipe function creates a new HTTPipe webserver

func (*Server) ChangeDefault

func (s *Server) ChangeDefault(p string)

ChangeDefault function sets de default response

func (*Server) ChangeJS

func (s *Server) ChangeJS(p string)

ChangeJS function sets the response for *.js requests

func (*Server) ChangeJSON

func (s *Server) ChangeJSON(p string)

ChangeJSON function sets the response for *.json requests

func (*Server) HowManyWS

func (s *Server) HowManyWS() int

HowManyWS function gets the amount of active WebSockers

func (*Server) ReadFromConn

func (s *Server) ReadFromConn(n int) wsData

ReadFromConn function reads from channel

func (*Server) StartBackground

func (s *Server) StartBackground(addr string)

StartBackground function starts a webserver from a goroutine addr describe where this webserver will listen for connections

func (*Server) StopBackground

func (s *Server) StopBackground() error

StopBackground function shutdowns the webserver

func (*Server) WriteToConn

func (s *Server) WriteToConn(n int, data wsData)

WriteToConn function writes to channel

Jump to

Keyboard shortcuts

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