bom/server/game/Packet.go

25 lines
381 B
Go

package game
import (
"net"
)
// Byte prefixes to indicate the packet type.
const (
Ping = 1
Login = 2
Logout = 3
PlayerAdd = 10
PlayerRemove = 11
PlayerMove = 12
PlayerJump = 13
PlayerUseSkill = 14
Chat = 20
)
// Packet represents a single UDP datagram.
type Packet struct {
Data []byte
Address *net.UDPAddr
}