Documentation ¶
Index ¶
- Constants
- Variables
- func NewLocal(p *proxy.Proto) proxy.Peer
- func NewPong(p *proxy.Proto) pong
- func NewRemote(p *proxy.Proto) proxy.Peer
- type Local
- func (l Local) AfterReceive(t *proxy.Tunnel) (err error)
- func (l Local) AfterSend(t *proxy.Tunnel) (err error)
- func (l Local) BeforeSend(t *proxy.Tunnel) (err error)
- func (p *Local) ClearConn()
- func (p *Local) Close() error
- func (p Local) Handle(src net.Conn)
- func (p Local) Hi(dst net.Conn, ver byte, clientId uuid.UUID) (err error)
- func (p *Local) NewConn(conn net.Conn, ver byte, do proxy.Do, isLocal bool) *pconn
- func (p *Local) Open(t *proxy.Tunnel) (err error)
- func (p *Local) Stat() *proxy.PointStat
- func (p Local) Who(src net.Conn) (ver byte, err error)
- type Remote
- func (r Remote) AfterDial(t *proxy.Tunnel, err error) error
- func (r Remote) AfterReceive(t *proxy.Tunnel) (err error)
- func (r Remote) AfterSend(t *proxy.Tunnel) (err error)
- func (p *Remote) ClearConn()
- func (p *Remote) Close() error
- func (p Remote) Handle(src net.Conn)
- func (p Remote) Hi(dst net.Conn, ver byte, clientId uuid.UUID) (err error)
- func (p *Remote) NewConn(conn net.Conn, ver byte, do proxy.Do, isLocal bool) *pconn
- func (p *Remote) Open(t *proxy.Tunnel) (err error)
- func (p *Remote) Stat() *proxy.PointStat
- func (p Remote) Who(src net.Conn) (ver byte, err error)
Constants ¶
Variables ¶
View Source
var Conn_TimeOut int64 = 1 * 60 * 1000
View Source
var Data_TimeOut int64 = 10 * 1000
View Source
var FrameWriteBuffer = sync.Pool{ New: func() interface{} { buf := make([]byte, Frame_Buf_Size+7) return &buf }, }
View Source
var Frame_Buf_Size uint16 = 8192
View Source
var Frames = frameCache{ // contains filtered or unexported fields }
View Source
var Max_Live int64 = 1 * 60 * 60 * 1000
View Source
var PayloadPool = sync.Pool{ New: func() interface{} { buf := make([]byte, Frame_Buf_Size) return &buf }, }
View Source
var Peek_Time time.Duration = 30
View Source
var Per_Max_Count int = 30
Functions ¶
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (Local) AfterReceive ¶ added in v0.9.3
func (Local) Hi ¶
*
connection header +----+-----+-------+ | VER | CLIENT_ID | +----+-----+-------+ | 1 | 16 | +----+-----+-------+
just say who am i, server no response
Click to show internal directories.
Click to hide internal directories.