berconpy.ServerPacket

class berconpy.ServerPacket(data)

The base class used for packets sent by the server.

The subclasses of this packet are:

Methods

assert_checksum(checksum)

Asserts that the packet has a given checksum.

from_bytes(data[, from_client])

Constructs a packet from the given data.

Attributes

data

checksum

The CRC32 checksum included in the header.

index

The zero-based index of the packet associated with a COMMAND server response.

login_success

A boolean indicating if the server authenticated the client.

message

The message that was sent to the client/server.

sequence

The sequence number of the COMMAND or MESSAGE packet.

total

The total number of packets associated with a COMMAND server response.

type

The packet's type defined in the protocol.