netio

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: LGPL-2.1 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyConn

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

func ListenPacketSerial

func ListenPacketSerial(ctx context.Context, dialer dialer.Dialer, destination []netip.Addr, port uint16) (net.PacketConn, error)

func PutPacket added in v0.0.4

func PutPacket(p UDPPacket)

Types

type BidNatPacketConn

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

func NewBidirectionalNatConn

func NewBidirectionalNatConn(conn net.PacketConn, destination addrs.Socksaddr, source addrs.Socksaddr) *BidNatPacketConn

func (*BidNatPacketConn) ReadFrom

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

func (*BidNatPacketConn) WriteTo

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

type BindPacketWriter added in v0.0.4

type BindPacketWriter struct {
	PacketWriter

	Destination net.Addr
}

func (*BindPacketWriter) WriteTo added in v0.0.4

func (p *BindPacketWriter) WriteTo(bs []byte, destination net.Addr) (n int, err error)

type PacketWriter added in v0.0.4

type PacketWriter interface {
	WriteTo(bs []byte, destination net.Addr) (n int, err error)
}

type UDPPacket added in v0.0.4

type UDPPacket struct {
	Buf *buf.Buffer
	OOB []byte
}

func NewPacket added in v0.0.4

func NewPacket(p *buf.Buffer, oob []byte) UDPPacket

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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