Tunnel

package
v0.0.0-...-79ff9e0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxDataSize    = uint32(10000000)
	MaxMessageSize = uint32(4096)

	ErrNoConnection = errors.New("no connection!")
)

Functions

This section is empty.

Types

type Pack

type Pack struct {
	ReadNum uint32
	Size    uint32
	// contains filtered or unexported fields
}

type Tunnel

type Tunnel struct {
	ReadNum  uint32
	LastRead time.Time

	P         Pack
	LastState time.Time
	Send      bool
	// contains filtered or unexported fields
}

type TunnelSet

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

func CreateTunnelSet

func CreateTunnelSet(creater func([]byte) (io.ReadWriteCloser, error)) (this *TunnelSet)

func (*TunnelSet) Close

func (this *TunnelSet) Close()

func (*TunnelSet) Connect

func (this *TunnelSet) Connect(conn io.ReadWriter) (err error)

func (*TunnelSet) ConnectTunnel

func (this *TunnelSet) ConnectTunnel(conn io.ReadWriteCloser, cmd []byte) (err error)

Jump to

Keyboard shortcuts

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