canceler

package
v0.0.0-...-775528f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

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

func New

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

func (*Instance) Close

func (i *Instance) Close() error

func (*Instance) CloseWithError

func (i *Instance) CloseWithError(err error)

func (*Instance) SetTimeout

func (i *Instance) SetTimeout(timeout time.Duration)

func (*Instance) Timeout

func (i *Instance) Timeout() time.Duration

func (*Instance) Update

func (i *Instance) Update() bool

type PacketConn

type PacketConn interface {
	N.PacketConn
	Timeout() time.Duration
	SetTimeout(timeout time.Duration)
}

func NewPacketConn

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

func NewTimeoutPacketConn

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

type TimeoutPacketConn

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

func (*TimeoutPacketConn) Close

func (c *TimeoutPacketConn) Close() error

func (*TimeoutPacketConn) ReadPacket

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

func (*TimeoutPacketConn) SetTimeout

func (c *TimeoutPacketConn) SetTimeout(timeout time.Duration)

func (*TimeoutPacketConn) Timeout

func (c *TimeoutPacketConn) Timeout() time.Duration

func (*TimeoutPacketConn) Upstream

func (c *TimeoutPacketConn) Upstream() any

func (*TimeoutPacketConn) WritePacket

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

type TimerPacketConn

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

func (*TimerPacketConn) Close

func (c *TimerPacketConn) Close() error

func (*TimerPacketConn) ReadPacket

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

func (*TimerPacketConn) SetTimeout

func (c *TimerPacketConn) SetTimeout(timeout time.Duration)

func (*TimerPacketConn) Timeout

func (c *TimerPacketConn) Timeout() time.Duration

func (*TimerPacketConn) Upstream

func (c *TimerPacketConn) Upstream() any

func (*TimerPacketConn) WritePacket

func (c *TimerPacketConn) 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