bufio

package
v0.3.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: GPL-2.0 Imports: 20 Imported by: 365

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(destination io.Writer, source io.Reader) (n int64, err error)

func CopyConn

func CopyConn(ctx context.Context, source net.Conn, destination net.Conn) error

func CopyConnContextList added in v0.2.3

func CopyConnContextList(contextList []context.Context, source net.Conn, destination net.Conn) error

func CopyExtended

func CopyExtended(originSource io.Reader, destination N.ExtendedWriter, source N.ExtendedReader, readCounters []N.CountFunc, writeCounters []N.CountFunc) (n int64, err error)

func CopyExtendedBuffer

func CopyExtendedBuffer(originSource io.Writer, destination N.ExtendedWriter, source N.ExtendedReader, buffer *buf.Buffer, readCounters []N.CountFunc, writeCounters []N.CountFunc) (n int64, err error)

func CopyExtendedWithPool

func CopyExtendedWithPool(originSource io.Reader, destination N.ExtendedWriter, source N.ExtendedReader, readCounters []N.CountFunc, writeCounters []N.CountFunc) (n int64, err error)

func CopyPacket

func CopyPacket(destinationConn N.PacketWriter, source N.PacketReader) (n int64, err error)

func CopyPacketConn

func CopyPacketConn(ctx context.Context, source N.PacketConn, destination N.PacketConn) error

func CopyPacketConnContextList added in v0.2.3

func CopyPacketConnContextList(contextList []context.Context, source N.PacketConn, destination N.PacketConn) error

func CopyPacketWithPool

func CopyPacketWithPool(originSource N.PacketReader, destinationConn N.PacketWriter, source N.PacketReader, readCounters []N.CountFunc, writeCounters []N.CountFunc, notFirstTime bool) (n int64, err error)

func CreatePacketReadWaiter added in v0.2.5

func CreatePacketReadWaiter(reader N.PacketReader) (N.PacketReadWaiter, bool)

func CreateReadWaiter added in v0.2.5

func CreateReadWaiter(reader io.Reader) (N.ReadWaiter, bool)

func CreateVectorisedPacketWriter

func CreateVectorisedPacketWriter(writer any) (N.VectorisedPacketWriter, bool)

func CreateVectorisedWriter

func CreateVectorisedWriter(writer any) (N.VectorisedWriter, bool)

func NewAppendConn added in v0.1.8

func NewAppendConn(conn N.ExtendedConn, reader N.ExtendedReader, writer N.ExtendedWriter) N.ExtendedConn

func NewExtendedConn

func NewExtendedConn(conn net.Conn) N.ExtendedConn

func NewExtendedReader

func NewExtendedReader(reader io.Reader) N.ExtendedReader

func NewExtendedWriter

func NewExtendedWriter(writer io.Writer) N.ExtendedWriter

func NewNetPacketConn added in v0.2.2

func NewNetPacketConn(conn N.PacketConn) N.NetPacketConn

func NewNetPacketWriter added in v0.2.19

func NewNetPacketWriter(writer N.PacketWriter) N.NetPacketWriter

func NewPacketConn

func NewPacketConn(conn net.PacketConn) N.NetPacketConn

func NewReadOnlyConn

func NewReadOnlyConn(reader io.Reader) net.Conn

func NewUnbindPacketConn

func NewUnbindPacketConn(conn net.Conn) N.NetPacketConn

func NewUnbindPacketConnWithAddr added in v0.3.0

func NewUnbindPacketConnWithAddr(conn net.Conn, addr M.Socksaddr) N.NetPacketConn

func NewVectorisedWriter

func NewVectorisedWriter(writer io.Writer) N.VectorisedWriter

func NewWriteOnlyConn

func NewWriteOnlyConn(writer io.Writer) net.Conn

func ReadBuffer deprecated

func ReadBuffer(reader N.ExtendedReader, buffer *buf.Buffer) (n int, err error)

Deprecated: bad usage

func ReadPacket deprecated

func ReadPacket(reader N.PacketReader, buffer *buf.Buffer) (n int, addr net.Addr, err error)

Deprecated: bad usage

func ToSockaddr added in v0.3.0

func ToSockaddr(destination netip.AddrPort) (name unsafe.Pointer, nameLen uint32)

func Write

func Write(writer io.Writer, data []byte) (n int, err error)

func WriteBuffer

func WriteBuffer(writer N.ExtendedWriter, buffer *buf.Buffer) (n int, err error)

func WritePacket

func WritePacket(writer N.NetPacketWriter, data []byte, addr net.Addr) (n int, err error)

func WritePacketBuffer

func WritePacketBuffer(writer N.PacketWriter, buffer *buf.Buffer, destination M.Socksaddr) (n int, err error)

func WritePacketWithPool added in v0.2.5

func WritePacketWithPool(originSource N.PacketReader, destinationConn N.PacketWriter, packetBuffers []*N.PacketBuffer) (n int64, err error)

func WriteVectorised

func WriteVectorised(writer N.VectorisedWriter, data [][]byte) (n int, err error)

func WriteVectorisedPacket

func WriteVectorisedPacket(writer N.VectorisedPacketWriter, data [][]byte, destination M.Socksaddr) (n int, err error)

Types

type AddrConn

type AddrConn struct {
	net.Conn
	M.Metadata
}

func (*AddrConn) LocalAddr

func (c *AddrConn) LocalAddr() net.Addr

func (*AddrConn) ReadFrom

func (c *AddrConn) ReadFrom(r io.Reader) (n int64, err error)

func (*AddrConn) ReaderReplaceable

func (c *AddrConn) ReaderReplaceable() bool

func (*AddrConn) RemoteAddr

func (c *AddrConn) RemoteAddr() net.Addr

func (*AddrConn) Upstream

func (c *AddrConn) Upstream() any

func (*AddrConn) WriteTo

func (c *AddrConn) WriteTo(w io.Writer) (n int64, err error)

func (*AddrConn) WriterReplaceable

func (c *AddrConn) WriterReplaceable() bool

type BindPacketConn

type BindPacketConn interface {
	N.NetPacketConn
	net.Conn
}

func NewBindPacketConn added in v0.2.2

func NewBindPacketConn(conn net.PacketConn, addr net.Addr) BindPacketConn

type BindPacketReadWaiter added in v0.3.0

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

func (*BindPacketReadWaiter) InitializeReadWaiter added in v0.3.0

func (w *BindPacketReadWaiter) InitializeReadWaiter(options N.ReadWaitOptions) (needCopy bool)

func (*BindPacketReadWaiter) WaitReadBuffer added in v0.3.0

func (w *BindPacketReadWaiter) WaitReadBuffer() (buffer *buf.Buffer, err error)

type BufferedVectorisedWriter added in v0.1.8

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

func (*BufferedVectorisedWriter) Upstream added in v0.1.8

func (w *BufferedVectorisedWriter) Upstream() any

func (*BufferedVectorisedWriter) WriteVectorised added in v0.1.8

func (w *BufferedVectorisedWriter) WriteVectorised(buffers []*buf.Buffer) error

type BufferedWriter

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

func NewBufferedWriter

func NewBufferedWriter(upstream io.Writer, buffer *buf.Buffer) *BufferedWriter

func (*BufferedWriter) Fallthrough added in v0.1.7

func (w *BufferedWriter) Fallthrough() error

func (*BufferedWriter) Write

func (w *BufferedWriter) Write(p []byte) (n int, err error)

func (*BufferedWriter) WriterReplaceable added in v0.1.7

func (w *BufferedWriter) WriterReplaceable() bool

type CachedConn

type CachedConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewCachedConn

func NewCachedConn(conn net.Conn, buffer *buf.Buffer) *CachedConn

func (*CachedConn) Close

func (c *CachedConn) Close() error

func (*CachedConn) Read

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

func (*CachedConn) ReadCached

func (c *CachedConn) ReadCached() *buf.Buffer

func (*CachedConn) ReadFrom

func (c *CachedConn) ReadFrom(r io.Reader) (n int64, err error)

func (*CachedConn) ReaderReplaceable

func (c *CachedConn) ReaderReplaceable() bool

func (*CachedConn) SetReadDeadline

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

func (*CachedConn) Upstream

func (c *CachedConn) Upstream() any

func (*CachedConn) WriteTo

func (c *CachedConn) WriteTo(w io.Writer) (n int64, err error)

func (*CachedConn) WriterReplaceable

func (c *CachedConn) WriterReplaceable() bool

type CachedPacketConn

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

func NewCachedPacketConn

func NewCachedPacketConn(conn N.PacketConn, buffer *buf.Buffer, destination M.Socksaddr) *CachedPacketConn

func (*CachedPacketConn) Close added in v0.1.8

func (c *CachedPacketConn) Close() error

func (*CachedPacketConn) ReadCachedPacket

func (c *CachedPacketConn) ReadCachedPacket() *N.PacketBuffer

func (*CachedPacketConn) ReadPacket

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

func (*CachedPacketConn) ReaderReplaceable

func (c *CachedPacketConn) ReaderReplaceable() bool

func (*CachedPacketConn) Upstream

func (c *CachedPacketConn) Upstream() any

func (*CachedPacketConn) WriterReplaceable

func (c *CachedPacketConn) WriterReplaceable() bool

type CachedReader

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

func NewCachedReader

func NewCachedReader(upstream io.Reader, buffer *buf.Buffer) *CachedReader

func (*CachedReader) Close

func (r *CachedReader) Close() error

func (*CachedReader) Read

func (r *CachedReader) Read(p []byte) (n int, err error)

func (*CachedReader) ReadCached

func (r *CachedReader) ReadCached() *buf.Buffer

func (*CachedReader) ReaderReplaceable

func (r *CachedReader) ReaderReplaceable() bool

func (*CachedReader) Upstream

func (r *CachedReader) Upstream() any

func (*CachedReader) WriteTo

func (r *CachedReader) WriteTo(w io.Writer) (n int64, err error)

type ChunkReader

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

func NewChunkReader

func NewChunkReader(upstream io.Reader, maxChunkSize int) *ChunkReader

func (*ChunkReader) MTU

func (c *ChunkReader) MTU() int

func (*ChunkReader) Read

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

func (*ChunkReader) ReadBuffer

func (c *ChunkReader) ReadBuffer(buffer *buf.Buffer) error

func (*ChunkReader) ReadByte added in v0.2.5

func (c *ChunkReader) ReadByte() (byte, error)

func (*ChunkReader) ReadChunk added in v0.1.8

func (c *ChunkReader) ReadChunk() (*buf.Buffer, error)

type ChunkWriter

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

func NewChunkWriter

func NewChunkWriter(writer io.Writer, maxChunkSize int) *ChunkWriter

func (*ChunkWriter) MTU

func (w *ChunkWriter) MTU() int

func (*ChunkWriter) Upstream

func (w *ChunkWriter) Upstream() any

func (*ChunkWriter) Write

func (w *ChunkWriter) Write(p []byte) (n int, err error)

func (*ChunkWriter) WriteBuffer

func (w *ChunkWriter) WriteBuffer(buffer *buf.Buffer) error

type CounterConn added in v0.2.5

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

func NewCounterConn added in v0.2.5

func NewCounterConn(conn net.Conn, readCounter []N.CountFunc, writeCounter []N.CountFunc) *CounterConn

func NewInt64CounterConn added in v0.2.5

func NewInt64CounterConn(conn net.Conn, readCounter []*atomic.Int64, writeCounter []*atomic.Int64) *CounterConn

func (*CounterConn) Read added in v0.2.5

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

func (*CounterConn) ReadBuffer added in v0.2.5

func (c *CounterConn) ReadBuffer(buffer *buf.Buffer) error

func (*CounterConn) UnwrapReader added in v0.2.5

func (c *CounterConn) UnwrapReader() (io.Reader, []N.CountFunc)

func (*CounterConn) UnwrapWriter added in v0.2.5

func (c *CounterConn) UnwrapWriter() (io.Writer, []N.CountFunc)

func (*CounterConn) Upstream added in v0.2.5

func (c *CounterConn) Upstream() any

func (*CounterConn) Write added in v0.2.5

func (c *CounterConn) Write(p []byte) (n int, err error)

func (*CounterConn) WriteBuffer added in v0.2.5

func (c *CounterConn) WriteBuffer(buffer *buf.Buffer) error

type CounterPacketConn added in v0.2.5

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

func NewCounterPacketConn added in v0.2.5

func NewCounterPacketConn(conn N.PacketConn, readCounter []N.CountFunc, writeCounter []N.CountFunc) *CounterPacketConn

func NewInt64CounterPacketConn added in v0.2.5

func NewInt64CounterPacketConn(conn N.PacketConn, readCounter []*atomic.Int64, writeCounter []*atomic.Int64) *CounterPacketConn

func (*CounterPacketConn) ReadPacket added in v0.2.5

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

func (*CounterPacketConn) UnwrapPacketReader added in v0.2.5

func (c *CounterPacketConn) UnwrapPacketReader() (N.PacketReader, []N.CountFunc)

func (*CounterPacketConn) UnwrapPacketWriter added in v0.2.5

func (c *CounterPacketConn) UnwrapPacketWriter() (N.PacketWriter, []N.CountFunc)

func (*CounterPacketConn) Upstream added in v0.2.5

func (c *CounterPacketConn) Upstream() any

func (*CounterPacketConn) WritePacket added in v0.2.5

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

type ExtendedConnWrapper

type ExtendedConnWrapper struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*ExtendedConnWrapper) ReadBuffer

func (w *ExtendedConnWrapper) ReadBuffer(buffer *buf.Buffer) error

func (*ExtendedConnWrapper) ReadFrom

func (w *ExtendedConnWrapper) ReadFrom(r io.Reader) (n int64, err error)

func (*ExtendedConnWrapper) ReaderReplaceable

func (w *ExtendedConnWrapper) ReaderReplaceable() bool

func (*ExtendedConnWrapper) Upstream

func (w *ExtendedConnWrapper) Upstream() any

func (*ExtendedConnWrapper) UpstreamReader

func (w *ExtendedConnWrapper) UpstreamReader() any

func (*ExtendedConnWrapper) UpstreamWriter

func (w *ExtendedConnWrapper) UpstreamWriter() any

func (*ExtendedConnWrapper) WriteBuffer

func (w *ExtendedConnWrapper) WriteBuffer(buffer *buf.Buffer) error

func (*ExtendedConnWrapper) WriteTo

func (r *ExtendedConnWrapper) WriteTo(w io.Writer) (n int64, err error)

func (*ExtendedConnWrapper) WriterReplaceable

func (w *ExtendedConnWrapper) WriterReplaceable() bool

type ExtendedPacketConn

type ExtendedPacketConn struct {
	net.PacketConn
}

func (*ExtendedPacketConn) ReadPacket

func (w *ExtendedPacketConn) ReadPacket(buffer *buf.Buffer) (M.Socksaddr, error)

func (*ExtendedPacketConn) Upstream

func (w *ExtendedPacketConn) Upstream() any

func (*ExtendedPacketConn) WritePacket

func (w *ExtendedPacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

type ExtendedReaderWrapper

type ExtendedReaderWrapper struct {
	io.Reader
}

func (*ExtendedReaderWrapper) ReadBuffer

func (r *ExtendedReaderWrapper) ReadBuffer(buffer *buf.Buffer) error

func (*ExtendedReaderWrapper) ReaderReplaceable

func (r *ExtendedReaderWrapper) ReaderReplaceable() bool

func (*ExtendedReaderWrapper) Upstream

func (r *ExtendedReaderWrapper) Upstream() any

func (*ExtendedReaderWrapper) WriteTo

func (r *ExtendedReaderWrapper) WriteTo(w io.Writer) (n int64, err error)

type ExtendedUDPConn

type ExtendedUDPConn struct {
	*net.UDPConn
}

func (*ExtendedUDPConn) ReadPacket

func (w *ExtendedUDPConn) ReadPacket(buffer *buf.Buffer) (M.Socksaddr, error)

func (*ExtendedUDPConn) Upstream

func (w *ExtendedUDPConn) Upstream() any

func (*ExtendedUDPConn) WritePacket

func (w *ExtendedUDPConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error

type ExtendedWriterWrapper

type ExtendedWriterWrapper struct {
	io.Writer
}

func (*ExtendedWriterWrapper) ReadFrom

func (w *ExtendedWriterWrapper) ReadFrom(r io.Reader) (n int64, err error)

func (*ExtendedWriterWrapper) Upstream

func (w *ExtendedWriterWrapper) Upstream() any

func (*ExtendedWriterWrapper) WriteBuffer

func (w *ExtendedWriterWrapper) WriteBuffer(buffer *buf.Buffer) error

func (*ExtendedWriterWrapper) WriterReplaceable added in v0.2.5

func (w *ExtendedWriterWrapper) WriterReplaceable() bool

type FallbackPacketConn added in v0.2.2

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

func (*FallbackPacketConn) ReadFrom added in v0.2.2

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

func (*FallbackPacketConn) ReaderReplaceable added in v0.2.3

func (c *FallbackPacketConn) ReaderReplaceable() bool

func (*FallbackPacketConn) Upstream added in v0.2.3

func (c *FallbackPacketConn) Upstream() any

func (*FallbackPacketConn) UpstreamWriter added in v0.2.19

func (c *FallbackPacketConn) UpstreamWriter() any

func (*FallbackPacketConn) WriteTo added in v0.2.2

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

func (*FallbackPacketConn) WriterReplaceable added in v0.2.3

func (c *FallbackPacketConn) WriterReplaceable() bool

type FallbackPacketWriter added in v0.2.19

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

func (*FallbackPacketWriter) Upstream added in v0.2.19

func (c *FallbackPacketWriter) Upstream() any

func (*FallbackPacketWriter) WriteTo added in v0.2.19

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

func (*FallbackPacketWriter) WriterReplaceable added in v0.2.19

func (c *FallbackPacketWriter) WriterReplaceable() bool

type NATPacketConn added in v0.2.2

type NATPacketConn interface {
	N.NetPacketConn
	UpdateDestination(destinationAddress netip.Addr)
}

func NewNATPacketConn added in v0.2.2

func NewNATPacketConn(conn N.NetPacketConn, origin M.Socksaddr, destination M.Socksaddr) NATPacketConn

func NewUnidirectionalNATPacketConn added in v0.2.18

func NewUnidirectionalNATPacketConn(conn N.NetPacketConn, origin M.Socksaddr, destination M.Socksaddr) NATPacketConn

type NetVectorisedWriterWrapper

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

func (*NetVectorisedWriterWrapper) Upstream

func (w *NetVectorisedWriterWrapper) Upstream() any

func (*NetVectorisedWriterWrapper) WriteVectorised

func (w *NetVectorisedWriterWrapper) WriteVectorised(buffers []*buf.Buffer) error

func (*NetVectorisedWriterWrapper) WriterReplaceable

func (w *NetVectorisedWriterWrapper) WriterReplaceable() bool

type RaceWriter

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

func NewRaceWriter

func NewRaceWriter(writer io.Writer) *RaceWriter

func (*RaceWriter) Upstream

func (w *RaceWriter) Upstream() any

func (*RaceWriter) Write

func (w *RaceWriter) Write(p []byte) (n int, err error)

func (*RaceWriter) WriteBuffer

func (w *RaceWriter) WriteBuffer(buffer *buf.Buffer) error

type ReadOnlyConn

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

func (*ReadOnlyConn) Close

func (c *ReadOnlyConn) Close() error

func (*ReadOnlyConn) LocalAddr

func (c *ReadOnlyConn) LocalAddr() net.Addr

func (*ReadOnlyConn) Read

func (c *ReadOnlyConn) Read(b []byte) (n int, err error)

func (*ReadOnlyConn) RemoteAddr

func (c *ReadOnlyConn) RemoteAddr() net.Addr

func (*ReadOnlyConn) SetDeadline

func (c *ReadOnlyConn) SetDeadline(t time.Time) error

func (*ReadOnlyConn) SetReadDeadline

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

func (*ReadOnlyConn) SetWriteDeadline

func (c *ReadOnlyConn) SetWriteDeadline(t time.Time) error

func (*ReadOnlyConn) Upstream

func (c *ReadOnlyConn) Upstream() any

func (*ReadOnlyConn) Write

func (c *ReadOnlyConn) Write(b []byte) (n int, err error)

type SyscallVectorisedPacketWriter

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

func (*SyscallVectorisedPacketWriter) Upstream

func (w *SyscallVectorisedPacketWriter) Upstream() any

func (*SyscallVectorisedPacketWriter) WriteVectorisedPacket

func (w *SyscallVectorisedPacketWriter) WriteVectorisedPacket(buffers []*buf.Buffer, destination M.Socksaddr) error

type SyscallVectorisedWriter

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

func (*SyscallVectorisedWriter) Upstream

func (w *SyscallVectorisedWriter) Upstream() any

func (*SyscallVectorisedWriter) WriteVectorised

func (w *SyscallVectorisedWriter) WriteVectorised(buffers []*buf.Buffer) error

func (*SyscallVectorisedWriter) WriterReplaceable

func (w *SyscallVectorisedWriter) WriterReplaceable() bool

type UnbindPacketConn

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

func (*UnbindPacketConn) CreateReadWaiter added in v0.3.0

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

func (*UnbindPacketConn) ReadFrom

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

func (*UnbindPacketConn) ReadPacket

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

func (*UnbindPacketConn) Upstream

func (c *UnbindPacketConn) Upstream() any

func (*UnbindPacketConn) WritePacket

func (c *UnbindPacketConn) WritePacket(buffer *buf.Buffer, _ M.Socksaddr) error

func (*UnbindPacketConn) WriteTo

func (c *UnbindPacketConn) WriteTo(p []byte, _ net.Addr) (n int, err error)

type UnbindPacketReadWaiter added in v0.3.0

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

func (*UnbindPacketReadWaiter) InitializeReadWaiter added in v0.3.0

func (w *UnbindPacketReadWaiter) InitializeReadWaiter(options N.ReadWaitOptions) (needCopy bool)

func (*UnbindPacketReadWaiter) WaitReadPacket added in v0.3.0

func (w *UnbindPacketReadWaiter) WaitReadPacket() (buffer *buf.Buffer, destination M.Socksaddr, err error)

type UnbindVectorisedPacketWriter

type UnbindVectorisedPacketWriter struct {
	N.VectorisedWriter
}

func (*UnbindVectorisedPacketWriter) WriteVectorisedPacket

func (w *UnbindVectorisedPacketWriter) WriteVectorisedPacket(buffers []*buf.Buffer, _ M.Socksaddr) error

type WriteOnlyConn

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

func (*WriteOnlyConn) Close

func (c *WriteOnlyConn) Close() error

func (*WriteOnlyConn) LocalAddr

func (c *WriteOnlyConn) LocalAddr() net.Addr

func (*WriteOnlyConn) Read

func (c *WriteOnlyConn) Read(b []byte) (n int, err error)

func (*WriteOnlyConn) RemoteAddr

func (c *WriteOnlyConn) RemoteAddr() net.Addr

func (*WriteOnlyConn) SetDeadline

func (c *WriteOnlyConn) SetDeadline(t time.Time) error

func (*WriteOnlyConn) SetReadDeadline

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

func (*WriteOnlyConn) SetWriteDeadline

func (c *WriteOnlyConn) SetWriteDeadline(t time.Time) error

func (*WriteOnlyConn) Upstream

func (c *WriteOnlyConn) Upstream() any

func (*WriteOnlyConn) Write

func (c *WriteOnlyConn) Write(b []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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