fastudp

package module
v0.0.0-...-ff42a72 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 11 Imported by: 0

README

fastudp

fast and more fast

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgHdrSize     = 128
	ReadEventSize  = 128
	WriteEventSize = 128
)

Functions

This section is empty.

Types

type Handler

type Handler func([]byte, *net.UDPAddr)

type Server

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

func NewUDPServer

func NewUDPServer(network, addr string, reusePort bool, listenerN int, mtu int, handler Handler) (*Server, error)

func (*Server) FillWriteQueue

func (svr *Server) FillWriteQueue(mmsgs ...*netudp.Mmsg) (int, error)

func (*Server) Shutdown

func (svr *Server) Shutdown()

func (*Server) WriteTo

func (svr *Server) WriteTo(data []byte, addr *net.UDPAddr)

TODO: need load balancing?

func (*Server) WriteToN

func (svr *Server) WriteToN(mmsgs ...*netudp.Mmsg) (int, error)

直接发送

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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