Documentation ¶
Index ¶
- Constants
- type Server
- func (this *Server) Cfg() config.Server
- func (this *Server) Copy(to io.Writer, from io.Reader, ch chan<- core.ReadWriteCount, isIn bool) error
- func (this *Server) HandleClientConnect(ctx *core.TcpContext)
- func (this *Server) HandleClientDisconnect(client net.Conn)
- func (this *Server) Listen() (err error)
- func (this *Server) Start() error
- func (this *Server) Stop()
Constants ¶
View Source
const ( /* Buffer size to handle data from socket */ BUFFER_SIZE = 16 * 1024 /* Interval of pushing aggregated read/write stats */ PROXY_STATS_PUSH_INTERVAL = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Copy ¶
func (this *Server) Copy(to io.Writer, from io.Reader, ch chan<- core.ReadWriteCount, isIn bool) error
*
- It's build by analogy of io.Copy
func (*Server) HandleClientConnect ¶
func (this *Server) HandleClientConnect(ctx *core.TcpContext)
*
- Handle new client connection
Click to show internal directories.
Click to hide internal directories.