nex-go/packet_types.go
2022-03-29 00:15:55 -04:00

26 lines
618 B
Go

package nex
const (
// SynPacket is the ID for the PRUDP Syn Packet type
SynPacket uint16 = 0x0
// ConnectPacket is the ID for the PRUDP Connect Packet type
ConnectPacket uint16 = 0x1
// DataPacket is the ID for the PRUDP Data Packet type
DataPacket uint16 = 0x2
// DisconnectPacket is the ID for the PRUDP Disconnect Packet type
DisconnectPacket uint16 = 0x3
// PingPacket is the ID for the PRUDP Ping Packet type
PingPacket uint16 = 0x4
)
var validTypes = map[uint16]bool{
SynPacket: true,
ConnectPacket: true,
DataPacket: true,
DisconnectPacket: true,
PingPacket: true,
}