Documentation ¶
Index ¶
- func Accept(l net.Listener, f func(c net.Conn))
- func CopyWaitGroup(conn1, conn2 net.Conn, crypt bool, snappy bool, rate *rate.Rate, ...)
- func GetConn(conn net.Conn, cpt, snappy bool, rate *rate.Rate, isServer bool) io.ReadWriteCloser
- func GetLen(reader io.Reader) (int, error)
- func GetLenBytes(buf []byte) (b []byte, err error)
- func NewKcpListenerAndProcess(addr string, f func(c net.Conn)) error
- func NewTcpListenerAndProcess(addr string, f func(c net.Conn), listener *net.Listener) 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) GetHealthInfo() (info string, 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) GetShortContent(l int) (b []byte, err error)
- func (s *Conn) GetShortLenContent() (b []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) ReadLen(cLen int, buf []byte) (int, error)
- func (s *Conn) SendConfigInfo(c *config.CommonConfig) (int, error)
- func (s *Conn) SendHealthInfo(info, status string) (int, error)
- func (s *Conn) SendHostInfo(h *file.Host) (int, error)
- func (s *Conn) SendLinkInfo(link *Link) (int, error)
- func (s *Conn) SendTaskInfo(t *file.Tunnel) (int, error)
- func (s *Conn) SetAlive(tp string)
- func (s *Conn) SetReadDeadline(t time.Duration, tp string)
- 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) WriteLenContent(buf []byte) (err error)
- func (s *Conn) WriteMain() (int, error)
- type Link
- type Secret
- type SnappyConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyWaitGroup ¶ added in v0.18.0
func CopyWaitGroup(conn1, conn2 net.Conn, crypt bool, snappy bool, rate *rate.Rate, flow *file.Flow, isServer bool, rb []byte)
conn1 mux conn
func NewKcpListenerAndProcess ¶ added in v0.19.0
func NewTcpListenerAndProcess ¶ added in v0.19.0
func SetUdpSession ¶
func SetUdpSession(sess *kcp.UDPSession)
Types ¶
type Conn ¶
func (*Conn) GetAddStatus ¶ added in v0.0.15
get task or host result of add
func (*Conn) GetConfigInfo ¶ added in v0.0.15
get task info
func (*Conn) GetHealthInfo ¶ added in v0.18.1
get health info from conn
func (*Conn) GetHostInfo ¶ added in v0.0.15
get task info
func (*Conn) GetLinkInfo ¶
get link info from conn
func (*Conn) GetShortContent ¶ added in v0.18.0
func (*Conn) GetShortLenContent ¶ added in v0.18.0
func (*Conn) SendConfigInfo ¶ added in v0.0.15
func (s *Conn) SendConfigInfo(c *config.CommonConfig) (int, error)
send task info
func (*Conn) SendHealthInfo ¶ added in v0.18.1
send info for link
func (*Conn) SendHostInfo ¶ added in v0.0.15
send host info
func (*Conn) WriteAddFail ¶ added in v0.0.15
func (*Conn) WriteAddOk ¶ added in v0.0.15
func (*Conn) WriteLenContent ¶ added in v0.18.0
type Link ¶
type SnappyConn ¶
type SnappyConn struct {
// contains filtered or unexported fields
}
func NewSnappyConn ¶
func NewSnappyConn(conn io.ReadWriteCloser, crypt bool, rate *rate.Rate) *SnappyConn
func (*SnappyConn) Close ¶ added in v0.18.0
func (s *SnappyConn) Close() error
Click to show internal directories.
Click to hide internal directories.