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
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
- Packet header length
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 typeT
which implements this trait. BanchoPacketWrite
is 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
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.