Documentation ¶
Index ¶
- Constants
- Variables
- func LabelToTag(label string) uint32
- func NewConnection(conn net.Conn)
- func ReadPair(buf *PacketBuff) Pair
- func ReadTriple(buf *PacketBuff) Triple
- func TagToLabel(tag uint32) string
- func WriteTdf[T Tdf](buf *PacketBuff, value T)
- type BlobTdf
- type Connection
- type FloatTdf
- type Int64Tdf
- type ListTdf
- type Packet
- type PacketBuff
- func (b *PacketBuff) EncodePacket(comp uint16, cmd uint16, err uint16, qType uint16, id uint16, ...) []byte
- func (b *PacketBuff) EncodePacketRaw(packet Packet) []byte
- func (b *PacketBuff) Float64() float64
- func (b *PacketBuff) ReadAllPackets() *list.List
- func (b *PacketBuff) ReadBlobTdf(head TdfImpl) BlobTdf
- func (b *PacketBuff) ReadFloatTdf(head TdfImpl) FloatTdf
- func (b *PacketBuff) ReadIntTdf(head TdfImpl) Int64Tdf
- func (b *PacketBuff) ReadListTdf(head TdfImpl) ListTdf
- func (b *PacketBuff) ReadPacket() *Packet
- func (b *PacketBuff) ReadPacketHeading() *Packet
- func (b *PacketBuff) ReadPairListTdf(head TdfImpl) PairListTdf
- func (b *PacketBuff) ReadPairTdf(head TdfImpl) PairTdf
- func (b *PacketBuff) ReadString() string
- func (b *PacketBuff) ReadStringTdf(head TdfImpl) StringTdf
- func (b *PacketBuff) ReadStructTdf(head TdfImpl) StructTdf
- func (b *PacketBuff) ReadStructValues() (*list.List, bool)
- func (b *PacketBuff) ReadTdf() Tdf
- func (b *PacketBuff) ReadTripleTdf(head TdfImpl) TripleTdf
- func (b *PacketBuff) ReadUnionTdf(head TdfImpl) UnionTdf
- func (b *PacketBuff) ReadVarInt() uint64
- func (b *PacketBuff) ReadVarIntListTdf(head TdfImpl) VarIntListTdf
- func (b *PacketBuff) UInt16() uint16
- func (b *PacketBuff) UInt32() uint32
- func (b *PacketBuff) WriteNum(value any)
- func (b *PacketBuff) WriteString(value string)
- func (b *PacketBuff) WriteVarInt(value int64)
- type PairListTdf
- type PairTdf
- type StringTdf
- type StructTdf
- type SubType
- type Tdf
- type TdfImpl
- type TdfType
- type TripleTdf
- type UnionTdf
- type VarIntListTdf
Constants ¶
const ( IntList SubType = 0 StringList = 1 StructList = 3 TripleList = 9 FloatList = 10 )
Variables ¶
var CommandNames = map[uint32]string{}/* 186 elements not displayed */
var ComponentNames = map[uint16]string{
0x1: "Authentication Component",
0x3: "Example Component",
0x4: "Game Manager Component",
0x5: "Redirect Component",
0x6: "Play Groups Component",
0x7: "Stats Component",
0x9: "Util Component",
0xA: "Census Data Component",
0xB: "Clubs Component",
0xC: "Game Report Legacy Component",
0xD: "League Component",
0xE: "Mail Component",
0xF: "Messaging Component",
0x14: "Locker Component",
0x15: "Rooms Component",
0x17: "Tournaments Component",
0x18: "Commerce Info Component",
0x19: "Association Lists Component",
0x1B: "GPS Content Controller Component",
0x1C: "Game Reporting Component",
0x7D0: "Dynamic Filter Component",
0x801: "RSP Component",
0x7802: "User Sessions Component",
}
var NotificationNames = map[uint32]string{
0x0004000A: "NotifyMatchmakingFailed",
0x0004000C: "NotifyMatchmakingAsyncStatus",
0x0004000F: "NotifyGameCreated",
0x00040010: "NotifyGameRemoved",
0x00040014: "NotifyGameSetup",
0x00040015: "NotifyPlayerJoining",
0x00040016: "NotifyJoiningPlayerInitiateConnections",
0x00040017: "NotifyPlayerJoiningQueue",
0x00040018: "NotifyPlayerPromotedFromQueue",
0x00040019: "NotifyPlayerClaimingReservation",
0x0004001E: "NotifyPlayerJoinCompleted",
0x00040028: "NotifyPlayerRemoved",
0x0004003C: "NotifyHostMigrationFinished",
0x00040046: "NotifyHostMigrationStart",
0x00040047: "NotifyPlatformHostInitialized",
0x00040050: "NotifyGameAttribChange",
0x0004005A: "NotifyPlayerAttribChange",
0x0004005F: "NotifyPlayerCustomDataChange",
0x00040064: "NotifyGameStateChange",
0x0004006E: "NotifyGameSettingsChange",
0x0004006F: "NotifyGameCapacityChange",
0x00040070: "NotifyGameReset",
0x00040071: "NotifyGameReportingIdChange",
0x00040073: "NotifyGameSessionUpdated",
0x00040074: "NotifyGamePlayerStateChange",
0x00040075: "NotifyGamePlayerTeamChange",
0x00040076: "NotifyGameTeamIdChange",
0x00040077: "NotifyProcessQueue",
0x00040078: "NotifyPresenceModeChanged",
0x00040079: "NotifyGamePlayerQueuePositionChange",
0x000400C9: "NotifyGameListUpdate",
0x000400CA: "NotifyAdminListChange",
0x000400DC: "NotifyCreateDynamicDedicatedServerGame",
0x000400E6: "NotifyGameNameChange",
}
Functions ¶
func LabelToTag ¶
func NewConnection ¶
func ReadPair ¶
func ReadPair(buf *PacketBuff) Pair
func ReadTriple ¶
func ReadTriple(buf *PacketBuff) Triple
func TagToLabel ¶
func WriteTdf ¶
func WriteTdf[T Tdf](buf *PacketBuff, value T)
Types ¶
type Connection ¶
type Connection struct { *PacketBuff net.Conn }
type Packet ¶
type Packet struct { Length uint16 Component uint16 Command uint16 Error uint16 QType uint16 Id uint16 ExtLength uint16 Content []byte }
func (*Packet) ReadContent ¶
func (*Packet) ToDescriptor ¶
type PacketBuff ¶
func (*PacketBuff) EncodePacket ¶
func (*PacketBuff) EncodePacketRaw ¶
func (b *PacketBuff) EncodePacketRaw(packet Packet) []byte
func (*PacketBuff) Float64 ¶
func (b *PacketBuff) Float64() float64
Float64 reads a float64 from the provided packet buffer using the big endian byte order
func (*PacketBuff) ReadAllPackets ¶
func (b *PacketBuff) ReadAllPackets() *list.List
func (*PacketBuff) ReadBlobTdf ¶
func (b *PacketBuff) ReadBlobTdf(head TdfImpl) BlobTdf
func (*PacketBuff) ReadFloatTdf ¶
func (b *PacketBuff) ReadFloatTdf(head TdfImpl) FloatTdf
func (*PacketBuff) ReadIntTdf ¶
func (b *PacketBuff) ReadIntTdf(head TdfImpl) Int64Tdf
func (*PacketBuff) ReadListTdf ¶
func (b *PacketBuff) ReadListTdf(head TdfImpl) ListTdf
func (*PacketBuff) ReadPacket ¶
func (b *PacketBuff) ReadPacket() *Packet
ReadPacket reads a game packet from the provided packet reader
func (*PacketBuff) ReadPacketHeading ¶
func (b *PacketBuff) ReadPacketHeading() *Packet
ReadPacketHeading reads a game packet from the provided packet reader. but only reads the heading portion of the packet skips over the packet contents.
func (*PacketBuff) ReadPairListTdf ¶
func (b *PacketBuff) ReadPairListTdf(head TdfImpl) PairListTdf
func (*PacketBuff) ReadPairTdf ¶
func (b *PacketBuff) ReadPairTdf(head TdfImpl) PairTdf
func (*PacketBuff) ReadString ¶
func (b *PacketBuff) ReadString() string
ReadString reads a string from the buffer
func (*PacketBuff) ReadStringTdf ¶
func (b *PacketBuff) ReadStringTdf(head TdfImpl) StringTdf
func (*PacketBuff) ReadStructTdf ¶
func (b *PacketBuff) ReadStructTdf(head TdfImpl) StructTdf
func (*PacketBuff) ReadStructValues ¶
func (b *PacketBuff) ReadStructValues() (*list.List, bool)
func (*PacketBuff) ReadTdf ¶
func (b *PacketBuff) ReadTdf() Tdf
func (*PacketBuff) ReadTripleTdf ¶
func (b *PacketBuff) ReadTripleTdf(head TdfImpl) TripleTdf
func (*PacketBuff) ReadUnionTdf ¶
func (b *PacketBuff) ReadUnionTdf(head TdfImpl) UnionTdf
func (*PacketBuff) ReadVarInt ¶
func (b *PacketBuff) ReadVarInt() uint64
ReadVarInt reads a var int from the packet buffer
func (*PacketBuff) ReadVarIntListTdf ¶
func (b *PacketBuff) ReadVarIntListTdf(head TdfImpl) VarIntListTdf
func (*PacketBuff) UInt16 ¶
func (b *PacketBuff) UInt16() uint16
UInt16 reads an uint16 from the provided packet buffer using the big endian byte order
func (*PacketBuff) UInt32 ¶
func (b *PacketBuff) UInt32() uint32
UInt32 reads an uint32 from the provided packet buffer using the big endian byte order
func (*PacketBuff) WriteNum ¶
func (b *PacketBuff) WriteNum(value any)
WriteNum takes any number type and writes it to the packet
func (*PacketBuff) WriteString ¶
func (b *PacketBuff) WriteString(value string)
WriteString writes a string to the buffer
func (*PacketBuff) WriteVarInt ¶
func (b *PacketBuff) WriteVarInt(value int64)
WriteVarInt writes a var int to the packet buffer
type PairListTdf ¶
type PairListTdf struct { SubTypeA SubType SubTypeB SubType Count int32 ListA *list.List ListB *list.List TdfImpl }
func NewPairList ¶
func (PairListTdf) GetHead ¶
func (t PairListTdf) GetHead() TdfImpl
func (PairListTdf) Write ¶
func (l PairListTdf) Write(buf *PacketBuff)
type PairTdf ¶
type PairTdf struct { Pair TdfImpl }
func (PairTdf) Write ¶
func (t PairTdf) Write(buf *PacketBuff)
type Tdf ¶
type Tdf interface { Write(buf *PacketBuff) GetHead() TdfImpl }
type TripleTdf ¶
type TripleTdf struct { Triple TdfImpl }
func (TripleTdf) Write ¶
func (t TripleTdf) Write(buf *PacketBuff)
type VarIntListTdf ¶
func NewVarIntList ¶
func NewVarIntList(label string, count int32, list *list.List) VarIntListTdf
func (VarIntListTdf) GetHead ¶
func (t VarIntListTdf) GetHead() TdfImpl
func (VarIntListTdf) Write ¶
func (t VarIntListTdf) Write(buf *PacketBuff)