Documentation
¶
Index ¶
- Variables
- func Copy(local, remote io.ReadWriteCloser)
- func NewReadWriter(conn net.Conn) io.ReadWriteCloser
- type Conn
- type Dialer
- type Handler
- type PollTaskPool
- type Signal
- type TaskPool
- type Wan
- func (w *Wan) Accept(id string, local net.Addr, config *msg.WspConfig) (io.ReadWriteCloser, error)
- func (w *Wan) Bridge(req *msg.Data, config *msg.WspConfig, rwan *Wan) error
- func (w *Wan) DialHTTP(remote *msg.WspConfig) (net.Conn, error)
- func (w *Wan) DialTCP(local net.Addr, remote *msg.WspConfig) (io.ReadWriteCloser, error)
- func (w *Wan) HeartBeat(d time.Duration)
- func (w *Wan) Reply(id string, message error) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnNotExist = errors.New("connection does not exist")
Functions ¶
func Copy ¶
func Copy(local, remote io.ReadWriteCloser)
func NewReadWriter ¶
func NewReadWriter(conn net.Conn) io.ReadWriteCloser
Types ¶
type PollTaskPool ¶
type PollTaskPool struct {
// contains filtered or unexported fields
}
func NewPollTaskPool ¶
func NewPollTaskPool(parallel, capacity int) *PollTaskPool
func (*PollTaskPool) Add ¶
func (p *PollTaskPool) Add(id uint64, task func())
func (*PollTaskPool) Close ¶
func (p *PollTaskPool) Close()
func (*PollTaskPool) Wait ¶
func (p *PollTaskPool) Wait()
type TaskPool ¶
type TaskPool struct {
// contains filtered or unexported fields
}
func NewTaskPool ¶
Click to show internal directories.
Click to hide internal directories.