RCON v0.2.1 RCON.Client View Source

Provides functionality to connect to a RCON server.

Link to this section Summary

Functions

Authenticate a connection given a password

Connects to an RCON server

Execute a command

Receive a RCON packet

Send a RCON packet

Link to this section Types

Link to this type options() View Source
options() :: [{:timeout, timeout()}]

Link to this section Functions

Link to this function authenticate(conn, password) View Source
authenticate(connection(), binary()) :: {:ok, connection()} | {:error, binary()}

Authenticate a connection given a password.

Link to this function connect(address, port, options \\ []) View Source
connect(Socket.Address.t(), :inet.port_number(), options()) ::
  {:ok, connection()} | {:error, Socket.Error.t()}

Connects to an RCON server.

Link to this function exec(conn, command) View Source
exec(connection(), binary()) ::
  {:ok, connection(), binary()} | {:error, binary()}

Execute a command.

Link to this function recv(conn) View Source
recv(connection()) :: {:ok, RCON.Packet.t()} | {:error, binary()}

Receive a RCON packet.

Send a RCON packet.