This package aims to provide a simple and easy to use interface to the RCON TCP and UDP specifications.
Installation
Using yarn:
$ yarn add @kldzj/rcon
Using npm:
$ npm i -S @kldzj/rcon
Usage
import { createConnection, RconProtocol } from '@kldzj/rcon';
const rcon = createConnection({
host: '127.0.0.1',
port: 27015,
password: 'dQw4w9WgXcQ',
protocol: RconProtocol.UDP,
challenge: true,
});
rcon.on('response', (str) => console.log(str));
await rcon.connect();
const status = await rcon.send('status');
await rcon.send('quit');
await rcon.disconnect();