canceler

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPacketConn

func NewPacketConn(ctx context.Context, conn N.PacketConn, timeout time.Duration) (context.Context, N.PacketConn)

Types

type Instance

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

func New

func New(ctx context.Context, cancelFunc context.CancelFunc, timeout time.Duration) *Instance

func (*Instance) Close

func (i *Instance) Close() error

func (*Instance) Update

func (i *Instance) Update() bool

type PacketConn

type PacketConn struct {
	N.PacketConn
	// contains filtered or unexported fields
}

func (*PacketConn) Close

func (c *PacketConn) Close() error

func (*PacketConn) ReadPacket

func (c *PacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)

func (*PacketConn) Upstream

func (c *PacketConn) Upstream() any

func (*PacketConn) WritePacket

func (c *PacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

Jump to

Keyboard shortcuts

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