UNPKG

tsrcon-client

Version:

A TypeScript RCON client for communicating with a RCON Server.

36 lines (34 loc) 913 B
type RCONClientOptions = { timeout?: number; retries?: number; reconnect?: boolean; reconnectDelay?: number; maxReconnectAttempts?: number; minDelayBetweenRequests?: number; }; declare class RCONClient { private host; private port; private password; private socket; private buffer; private isConnected; private reconnectAttempts; private authenticated; private callbacks; private requestQueue; private processingQueue; private lastRequestTime; private options; constructor(host: string, port: number, password: string, opts?: RCONClientOptions); connect(): Promise<void>; disconnect(): void; private tryReconnect; private handleData; private sendPacket; private authenticate; sendCommand(command: string): Promise<string>; private processQueue; ping(): Promise<boolean>; } export { RCONClient };