glame

Types

Thin wrapper over a TCP socket

pub type Connection {
  Connection(sock: mug.Socket, timeout_ms: Int)
}

Constructors

  • Connection(sock: mug.Socket, timeout_ms: Int)

Functions

pub fn dial(
  host: String,
  port: Int,
  password: String,
  connect_timeout_ms: Option(Int),
  rw_timeout_ms: Option(Int),
) -> Result(Connection, Error)

Connects to the TCP socket and auths with the RCON server

pub fn execute(
  conn: Connection,
  cmd: String,
) -> Result(String, Error)

Executes a command on the RCON server

Search Document