Versions in this module Expand all Collapse all v0 v0.20.2 Sep 6, 2021 Changes in this version + var ErrNazaNet = errors.New("nazanet: fxxk") + type AvailUdpConnPool struct + func NewAvailUdpConnPool(minPort uint16, maxPort uint16) *AvailUdpConnPool + func (a *AvailUdpConnPool) Acquire() (*net.UDPConn, uint16, error) + func (a *AvailUdpConnPool) Acquire2() (*net.UDPConn, uint16, *net.UDPConn, uint16, error) + func (a *AvailUdpConnPool) Peek() (uint16, error) + type ModUdpConnectionOption func(option *UdpConnectionOption) + type OnReadUdpPacket func(b []byte, raddr *net.UDPAddr, err error) bool + type UdpConnection struct + func NewUdpConnection(modOptions ...ModUdpConnectionOption) (*UdpConnection, error) + func (c *UdpConnection) Dispose() error + func (c *UdpConnection) ReadWithTimeout(timeoutMs int) ([]byte, *net.UDPAddr, error) + func (c *UdpConnection) RunLoop(onRead OnReadUdpPacket) error + func (c *UdpConnection) Write(b []byte) error + func (c *UdpConnection) Write2Addr(b []byte, ruaddr *net.UDPAddr) error + type UdpConnectionOption struct + AllocEachRead bool + Conn *net.UDPConn + LAddr string + MaxReadPacketSize int + RAddr string