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
- Impl bancho packet
Structs
BanchoMessageis the message structure of the bancho client.MatchDatais the data of bancho client multiplayer game room.- Bancho packet, including
PacketHeaderstructure and payload bytes. PacketBuildercan help pack bancho packets.- Bancho packet header, including
PacketIdand payload (data) length. PacketReaderhelps to read Bacho packets.PayloadReaderhelps to read Bacho packet data.- The
ScoreFrameuploaded 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
- Packet header length
Traits
BanchoPacketLengthis a trait used to calculate the byte length of the data converted to bancho packet.- Can use
PayloadReaderto read data from typeTwhich implements this trait. BanchoPacketWriteis a trait used to convert rust internal data types to bancho packets (Vec<u8>).
Functions
Type Definitions
Derive Macros
- This derive macro will implement the
BanchoPacketLengthtrait for the struct. - This derive macro will implement the
BanchoPacketReadtrait for the struct. - This derive macro will implement the
BanchoPacketWritetrait for the struct.