udp

package
v0.0.0-...-c8b884f Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadUDP

type ReadUDP interface {
	ReadFromUDP(b []byte) (n int, addr *net.UDPAddr, err error)
	ReadMsgUDP(b, oob []byte) (n, oobn, flags int, addr *net.UDPAddr, err error)
}

type Relay

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

func NewRelay

func NewRelay(pc1, pc2 net.PacketConn) *Relay

func (*Relay) Run

func (r *Relay) Run(ctx context.Context) (err error)

func (*Relay) SetBufferSize

func (r *Relay) SetBufferSize(n int)

func (*Relay) WithBypass

func (r *Relay) WithBypass(bp bypass.Bypass) *Relay

func (*Relay) WithLogger

func (r *Relay) WithLogger(logger logger.Logger) *Relay

type WriteUDP

type WriteUDP interface {
	WriteToUDP(b []byte, addr *net.UDPAddr) (int, error)
	WriteMsgUDP(b, oob []byte, addr *net.UDPAddr) (n, oobn int, err error)
}

Jump to

Keyboard shortcuts

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