Crate bancho_packets

source ·

Modules

Predefined client related bancho packets.
Provide some convenient declarative macros to help build bancho packets.
Predefined server related bancho packets.

Macros

Pack bancho packet data
Pack bancho packets

Structs

BanchoMessage is the message structure of the bancho client.
MatchData is the data of bancho client multiplayer game room.
Bancho packet, including PacketHeader structure and payload bytes.
PacketBuilder can help pack bancho packets.
Bancho packet header, including PacketId and payload (data) length.
PacketReader helps to read Bacho packets.
PayloadReader helps to read Bacho packet data.
The ScoreFrame uploaded by the bancho client during multiplayer games.

Enums

The bancho client will handle these failure reasons when the user login fails.
The login result of the bancho client. Returns Success(user_id) if success.
Known packet ids for bancho clients.

Constants

Traits

BanchoPacketLength is a trait used to calculate the byte length of the data converted to bancho packet.
Can use PayloadReader to read data from type T which implements this trait.
BanchoPacketWrite is a trait used to convert rust internal data types to bancho packets (Vec<u8>).
Generic type for str and String

Functions

Initial a packet with PacketId
Pack channel info packet data
Pack message packet data
Convert u32 to uleb128
Convert uleb128 bytes to u32

Derive Macros

This derive macro will implement the BanchoPacketLength trait for the struct.
This derive macro will implement the BanchoPacketRead trait for the struct.
This derive macro will implement the BanchoPacketWrite trait for the struct.