opengsq.rcon_protocols package

Submodules

opengsq.rcon_protocols.source_rcon module

class opengsq.rcon_protocols.source_rcon.SourceRcon(host: str, port: int = 27015, timeout: float = 5.0)

Bases: ProtocolBase

This class represents the Source RCON Protocol. It provides methods to interact with the Source RCON API.

full_name = 'Source RCON Protocol'
close()

Closes the connection to the server.

async authenticate(password: str)

Asynchronously authenticates the connection to the server using the given password.

Parameters:

password – The password to authenticate with.

async send_command(command: str) str

Asynchronously sends a command to the server.

Parameters:

command – The command to send to the server.

Returns:

The response from the server.

Module contents