deadline

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConn added in v1.18.2

func IsConn(conn any) bool

func IsPipe added in v1.18.2

func IsPipe(conn any) bool

func NewNetPacketConn

func NewNetPacketConn(pc net.PacketConn) net.PacketConn

func Pipe added in v1.18.1

func Pipe() (net.Conn, net.Conn)

Pipe creates a synchronous, in-memory, full duplex network connection; both ends implement the Conn interface. Reads on one end are matched with writes on the other, copying data directly between the two; there is no internal buffering.

Types

type Conn added in v1.18.0

type Conn struct {
	network.ExtendedConn
	// contains filtered or unexported fields
}

func NewConn added in v1.18.0

func NewConn(conn net.Conn) *Conn

func (*Conn) Read added in v1.18.0

func (c *Conn) Read(p []byte) (n int, err error)

func (*Conn) ReadBuffer added in v1.18.0

func (c *Conn) ReadBuffer(buffer *buf.Buffer) (err error)

func (*Conn) ReaderReplaceable added in v1.18.0

func (c *Conn) ReaderReplaceable() bool

func (*Conn) SetReadDeadline added in v1.18.0

func (c *Conn) SetReadDeadline(t time.Time) error

func (*Conn) Upstream added in v1.18.0

func (c *Conn) Upstream() any

type EnhancePacketConn

type EnhancePacketConn struct {
	*NetPacketConn
	// contains filtered or unexported fields
}

func (*EnhancePacketConn) WaitReadFrom

func (c *EnhancePacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr, err error)

type EnhanceSingPacketConn

type EnhanceSingPacketConn struct {
	*EnhancePacketConn
	// contains filtered or unexported fields
}

func (*EnhanceSingPacketConn) CreateReadWaiter

func (c *EnhanceSingPacketConn) CreateReadWaiter() (N.PacketReadWaiter, bool)

func (*EnhanceSingPacketConn) ReadPacket

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

func (EnhanceSingPacketConn) WaitReadFrom

func (c EnhanceSingPacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr, err error)

func (*EnhanceSingPacketConn) WritePacket

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

type NetPacketConn

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

func (*NetPacketConn) NeedAdditionalReadDeadline

func (c *NetPacketConn) NeedAdditionalReadDeadline() bool

func (*NetPacketConn) ReadFrom

func (c *NetPacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)

func (*NetPacketConn) ReaderReplaceable

func (c *NetPacketConn) ReaderReplaceable() bool

func (*NetPacketConn) SetReadDeadline

func (c *NetPacketConn) SetReadDeadline(t time.Time) error

func (*NetPacketConn) Upstream

func (c *NetPacketConn) Upstream() any

func (*NetPacketConn) WriterReplaceable

func (c *NetPacketConn) WriterReplaceable() bool

type SingPacketConn

type SingPacketConn struct {
	*NetPacketConn
	// contains filtered or unexported fields
}

func (*SingPacketConn) CreateReadWaiter

func (c *SingPacketConn) CreateReadWaiter() (N.PacketReadWaiter, bool)

func (*SingPacketConn) ReadPacket

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

func (*SingPacketConn) WritePacket

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