berconpy.RCONGenericProtocol

class berconpy.RCONGenericProtocol

Bases: ABC

The base class for handling the RCON protocol between two computers.

Methods

events_received()

Retrieves all events that have been parsed since this was last called.

packets_to_send()

Returns a list of payloads that should be sent to the remote computer.

receive_datagram(data)

Provides a packet from the remote computer to potentially be parsed into an event.

abstract events_received()

Retrieves all events that have been parsed since this was last called.

Return type:

Sequence[Any]

abstract packets_to_send()

Returns a list of payloads that should be sent to the remote computer.

Return type:

Sequence[Packet]

abstract receive_datagram(data)

Provides a packet from the remote computer to potentially be parsed into an event.

If the given data is invalid, this method should raise an error.

Return type:

Packet