udp

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToIPv6

func MapToIPv6(addr netip.AddrPort) netip.AddrPort

Types

type Packet

type Packet struct {
	Msg      *types.Msg
	AddrPort netip.AddrPort
}

type RawPacket

type RawPacket struct {
	Data     []byte
	AddrPort netip.AddrPort
}

type UDPService

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

func NewUDPService

func NewUDPService(udpAddr *net.UDPAddr, logger logger.Logger) (*UDPService, error)

func (*UDPService) In

func (u *UDPService) In() <-chan *RawPacket

func (*UDPService) MyAddrPortChan

func (u *UDPService) MyAddrPortChan() chan<- netip.AddrPort

func (*UDPService) Out

func (u *UDPService) Out() chan<- *Packet

Jump to

Keyboard shortcuts

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