server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BindAddr         string = "0.0.0.0"
	BindPort         int64  = 7000
	VhostHttpPort    int64  = 0 // if VhostHttpPort equals 0, do not listen a public port for http
	LogFile          string = "console"
	LogWay           string = "console" // console or file
	LogLevel         string = "info"
	LogMaxDays       int64  = 3
	HeartBeatTimeout int64  = 90
	UserConnTimeout  int64  = 10

	VhostMuxer *vhost.HttpMuxer
)

common config

View Source
var ProxyServers map[string]*ProxyServer = make(map[string]*ProxyServer)

Functions

func LoadConf

func LoadConf(confFile string) (err error)

Types

type Listener added in v0.5.0

type Listener interface {
	Accept() (*conn.Conn, error)
	Close() error
}

type ProxyServer

type ProxyServer struct {
	Name          string
	AuthToken     string
	Type          string
	BindAddr      string
	ListenPort    int64
	UseEncryption bool
	CustomDomains []string

	Status int64
	// contains filtered or unexported fields
}

func (*ProxyServer) Close

func (p *ProxyServer) Close()

func (*ProxyServer) Init

func (p *ProxyServer) Init()

func (*ProxyServer) Lock

func (p *ProxyServer) Lock()

func (*ProxyServer) RecvNewWorkConn added in v0.3.0

func (p *ProxyServer) RecvNewWorkConn(c *conn.Conn)

func (*ProxyServer) Start

func (p *ProxyServer) Start() (err error)

start listening for user conns

func (*ProxyServer) Unlock

func (p *ProxyServer) Unlock()

func (*ProxyServer) WaitUserConn

func (p *ProxyServer) WaitUserConn() (closeFlag bool)

Jump to

Keyboard shortcuts

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