udp

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MTU = 1472 // 最大传输单元

	MsgIDLen = 2 // 消息ID字段

	HeaderSize = MsgIDLen + MsgIDLen // 整个UDP包头部分
)

Variables

This section is empty.

Functions

func RecvPacket

func RecvPacket(pktData []byte) (msg interface{}, err error)

Types

type UDPMessageTransmitter

type UDPMessageTransmitter struct {
}

func (UDPMessageTransmitter) OnRecvMessage

func (UDPMessageTransmitter) OnRecvMessage(ses cellnet.Session) (msg interface{}, err error)

func (UDPMessageTransmitter) OnSendMessage

func (UDPMessageTransmitter) OnSendMessage(ses cellnet.Session, msg interface{}) error

Jump to

Keyboard shortcuts

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