Documentation ¶
Index ¶
- func GetLenByBytes(buf []byte) (int, error)
- func GetLenBytes(buf []byte) (b []byte, err error)
- func SetUdpSession(sess *kcp.UDPSession)
- type Conn
- func (s *Conn) Close() error
- func (s *Conn) GetAddStatus() (b bool)
- func (s *Conn) GetConfigInfo() (c *file.Client, err error)
- func (s *Conn) GetConnStatus() (id int, status bool, err error)
- func (s *Conn) GetHost() (method, address string, rb []byte, err error, r *http.Request)
- func (s *Conn) GetHostInfo() (h *file.Host, err error)
- func (s *Conn) GetLen() (int, error)
- func (s *Conn) GetLinkInfo() (lk *Link, err error)
- func (s *Conn) GetMsgContent(link *Link) (content []byte, err error)
- func (s *Conn) GetTaskInfo() (t *file.Tunnel, err error)
- func (s *Conn) Read(b []byte) (int, error)
- func (s *Conn) ReadFlag() (string, error)
- func (s *Conn) ReadFrom(b []byte, compress int, crypt bool, rate *rate.Rate) (int, error)
- func (s *Conn) ReadLen(cLen int) ([]byte, error)
- func (s *Conn) SendConfigInfo(c *config.CommonConfig) (int, error)
- func (s *Conn) SendHostInfo(h *file.Host) (int, error)
- func (s *Conn) SendLinkInfo(link *Link) (int, error)
- func (s *Conn) SendMsg(content []byte, link *Link) (n int, err error)
- func (s *Conn) SendTaskInfo(t *file.Tunnel) (int, error)
- func (s *Conn) SetAlive(tp string)
- func (s *Conn) SetKcpReadDeadline(t time.Duration)
- func (s *Conn) SetReadDeadline(t time.Duration, tp string)
- func (s *Conn) SetTcpReadDeadline(t time.Duration)
- func (s *Conn) Write(b []byte) (int, error)
- func (s *Conn) WriteAddFail() error
- func (s *Conn) WriteAddOk() error
- func (s *Conn) WriteChan() (int, error)
- func (s *Conn) WriteClose() (int, error)
- func (s *Conn) WriteConfig() (int, error)
- func (s *Conn) WriteError() (int, error)
- func (s *Conn) WriteFail(id int) (int, error)
- func (s *Conn) WriteMain() (int, error)
- func (s *Conn) WriteSign() (int, error)
- func (s *Conn) WriteSuccess(id int) (int, error)
- func (s *Conn) WriteTo(b []byte, compress int, crypt bool, rate *rate.Rate) (n int, err error)
- func (s *Conn) WriteWriteSuccess(id int) error
- type CryptConn
- type Link
- type Secret
- type SnappyConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetUdpSession ¶
func SetUdpSession(sess *kcp.UDPSession)
Types ¶
type Conn ¶
func (*Conn) GetAddStatus ¶ added in v0.0.15
func (*Conn) GetConfigInfo ¶ added in v0.0.15
get task info
func (*Conn) GetConnStatus ¶
read connect status
func (*Conn) GetHostInfo ¶ added in v0.0.15
get task info
func (*Conn) GetLinkInfo ¶
func (*Conn) GetMsgContent ¶
get msg content from conn
func (*Conn) SendConfigInfo ¶ added in v0.0.15
func (s *Conn) SendConfigInfo(c *config.CommonConfig) (int, error)
send task info
func (*Conn) SendHostInfo ¶ added in v0.0.15
send host info
func (*Conn) SetKcpReadDeadline ¶
set read dead time
func (*Conn) SetTcpReadDeadline ¶
set read dead time
func (*Conn) WriteAddFail ¶ added in v0.0.15
func (*Conn) WriteAddOk ¶ added in v0.0.15
func (*Conn) WriteWriteSuccess ¶ added in v0.0.16
type Link ¶
type Link struct { Id int //id ConnType string //连接类型 Host string //目标 En int //加密 De int //解密 Crypt bool //加密 Conn *Conn Flow *file.Flow UdpListener *net.UDPConn Rate *rate.Rate UdpRemoteAddr *net.UDPAddr MsgCh chan []byte MsgConn *Conn StatusCh chan bool FinishUse bool }
type SnappyConn ¶
type SnappyConn struct {
// contains filtered or unexported fields
}
func NewSnappyConn ¶
Click to show internal directories.
Click to hide internal directories.