stream

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConnNotExist = errors.New("connection does not exist")

Functions

func NewReadWriter added in v0.6.1

func NewReadWriter(conn net.Conn) io.ReadWriter

Types

type Dialer

type Dialer interface {
	NewConn(data *msg.Data, req *msg.WspRequest) error
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(dialer Dialer) *Handler

func (*Handler) Serve

func (w *Handler) Serve(wan *Wan)

type Lan

type Lan interface {
	Rewrite(data *msg.Data)
	Interrupt() error
	io.Closer
}

type Wan

type Wan struct {
	// contains filtered or unexported fields
}

func NewWan

func NewWan(conn net.Conn, state ws.State) *Wan

func (*Wan) Accept

func (w *Wan) Accept(id string, local net.Conn, config *msg.WspConfig) (io.WriteCloser, error)

func (*Wan) Bridge

func (w *Wan) Bridge(req *msg.Data, config *msg.WspConfig, rwan *Wan) error

func (*Wan) DialHTTP

func (w *Wan) DialHTTP(remote *msg.WspConfig) (net.Conn, error)

func (*Wan) DialTCP

func (w *Wan) DialTCP(local net.Conn, remote *msg.WspConfig) (io.WriteCloser, error)

func (*Wan) HeartBeat

func (w *Wan) HeartBeat(d time.Duration)

func (*Wan) Reply

func (w *Wan) Reply(id string, message error) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL