deadline

package
v0.0.0-...-17b02d1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 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

func IsConn(conn any) bool

func IsPipe

func IsPipe(conn any) bool

func NewNetPacketConn

func NewNetPacketConn(pc net.PacketConn) net.PacketConn

func Pipe

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

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

func NewConn

func NewConn(conn net.Conn) *Conn

func (*Conn) Read

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

func (*Conn) ReadBuffer

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

func (*Conn) ReaderReplaceable

func (c *Conn) ReaderReplaceable() bool

func (*Conn) SetReadDeadline

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

func (*Conn) Upstream

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