udp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadPacket

func ReadPacket(buf []byte, pack interface{}) error

Types

type Server

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

func Serve

func Serve(addr *net.UDPAddr) (*Server, error)

func (*Server) ReadSocket

func (s *Server) ReadSocket() (*packets.PacketHeader, interface{}, error)

type Stats

type Stats struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStats

func NewStats() *Stats

func (*Stats) ErrCount

func (s *Stats) ErrCount() int

func (*Stats) IncErr

func (s *Stats) IncErr()

func (*Stats) IncRecv

func (s *Stats) IncRecv()

func (*Stats) PPS

func (s *Stats) PPS() int

PPS = Packet Per Second

func (*Stats) RecvCount

func (s *Stats) RecvCount() int

Jump to

Keyboard shortcuts

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