berconpy.protocol.PacketType¶
- class berconpy.protocol.PacketType(value)¶
Bases:
EnumThe type of packet received by the server.
Each
Packetinstance falls under one of these types and can be checked through thePacket.typeproperty.The
valueof this enum directly corresponds with theprotocol specification.Note
This type can also be inferred from the packet’s class as subclasses directly correspond to the message type they are representing in the protocol (a.k.a. typestates).
Attributes
Used for the login process initiated by the client.
Used for command/response exchanges between the client and server.
Used for messages indicating activity on the server and acknowledgements by the client.
- COMMAND = 1¶
Used for command/response exchanges between the client and server.
- LOGIN = 0¶
Used for the login process initiated by the client.
- MESSAGE = 2¶
Used for messages indicating activity on the server and acknowledgements by the client.