...
Package info
Variables
var GetServerInfoPacket = [...]byte{
0x58, 0x46, 0x23, 0x01,
0x00,
0x00,
0x0C,
0x00,
0x01,
0x1f, 0x02, 0x00, 0x00,
}
func ParsePacket(data []byte) (packet, error)
type FileNeededEntry struct {
WillSend bool
TotalSize uint32
FileName string
MD5 [16]uint8
}
type PacketType uint8
const (
PacketTypeServerInfo PacketType = 0x0D
PacketTypePlayerInfo PacketType = 0x0E
)
type PlayerInfoEntry struct {
Node uint8
Name string
Address [4]uint8
Team uint8
Skin uint8
Data uint8
Score uint32
TimeInServer uint16
}
type PlayerInfoPacket struct {
PlayerInfo []PlayerInfoEntry
}
func (p PlayerInfoPacket) GetPacketType() PacketType
type ServerInfoPacket struct {
PacketVersion uint8
Application [16]byte
Version uint8
SubVersion uint8
NumberOfPlayer uint8
MaxPlayers uint8
GameType uint8
ModifiedGame bool
CheatsEnabled bool
KartVars uint8
FileNeededNum uint8
Time uint32
LevelTime uint32
ServerNameRaw []byte
ServerName string
MapName string
MapTitle string
MapMD5 [16]uint8
ActNum uint8
IsZone uint8
HttpSource string
FileNeeded []FileNeededEntry
}
func (p ServerInfoPacket) GetPacketType() PacketType