gonet

package
v0.0.0-...-91ccd0e Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultServeHTTPCall

func DefaultServeHTTPCall(srv *Server, w http.ResponseWriter, r *http.Request)

DefaultServeHTTPCall DefaultServeHTTPCall

func InvokeAndListen

func InvokeAndListen(port string, istls bool, certFile string, keyFile string, srvHttPReqstCall ...ServeHTTPCall) (err error)

InvokeAndListen Invoke Server and Start Listening

Types

type ServeHTTPCall

type ServeHTTPCall = func(srv *Server, w http.ResponseWriter, r *http.Request)

ServeHTTPCall ServeHTTPCall

type Server

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

Server conveniance struct wrapping arround *http.Server

func NewServer

func NewServer(port string, istls bool, certFile string, keyFile string, srvHttPReqstCall ...ServeHTTPCall) *Server

NewServer return *Server istls is tls listener certfile string - path to certificate file keyFile string - path to key file

func (*Server) Listen

func (svr *Server) Listen() (err error)

Listen start listening for connection(s)

func (*Server) ServeHTTP

func (svr *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP server http.Handler interface implementation of ServeHTTP

Jump to

Keyboard shortcuts

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