netmux

package module
v0.0.0-...-c0d97ca Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const MaxHeaderBytes = 128

TODO better way to do this

Variables

This section is empty.

Functions

This section is empty.

Types

type DetectStatus

type DetectStatus int

TODO rename perhaps?

const (
	DetectAccepted DetectStatus = iota
	DetectUncertain
	DetectRejected
)

type Detector

type Detector interface {
	Detect(header []byte) DetectStatus
}

type Handler

type Handler interface {
	Handle(c net.Conn)
}

type Server

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

func NewServer

func NewServer(srvcs []Service, fallback Handler) *Server

func (*Server) Handle

func (s *Server) Handle(c net.Conn)

func (*Server) Serve

func (s *Server) Serve(l net.Listener) error

func (*Server) ServeTLS

func (s *Server) ServeTLS(l net.Listener) error

type Service

type Service interface {
	Detector
	Handler
}

func NewService

func NewService(d Detector, h Handler) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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