battleye-node
Version:
A TS/JS library for communicating with BattlEye’s RCon (Remote Console) protocol. Easily send commands, receive server responses, and automate server management for games protected by BattlEye anti-cheat.
35 lines (34 loc) • 854 B
TypeScript
import EventEmitter from "events";
interface Config {
address: string;
port: number;
password: string;
connectionType?: "udp4" | "udp6";
connectionTimeout?: number;
connectionInterval?: number;
keepAliveInterval?: number;
}
declare class RCON extends EventEmitter {
private config;
private udp;
private connected;
private packageSend;
private sequence;
private loginAck;
private keepAliveInterval;
private loginConnectionInterval;
private sequenceQueue;
constructor(config: Config);
login(): void;
logout(): void;
commandSend(command: string): void;
get isRconConnected(): boolean;
private onLogin;
private onACK;
private sendKeepAlive;
private connectAttemping;
private reset;
private printMessage;
private onMessage;
}
export default RCON;