Class: RCONClient

RCONClient

Represents the RCON client, its connections, and managers.

new RCONClient(options)

Name Type Description
options Object

The connection parameters.

Name Type Description
host string optional

RCON server host.

port number optional

RCON server port.

password string optional

RCON server password.

Extends

  • EventEmitter

Members

connectionStatusstring

hoststring

passwordstring

playersPlayerManager

portnumber

Methods

Forcibly disconnects the client and shuts down all active network connections.

asyncfetchCommandInformation(){Promise.<RCONCommandInformation>}

Gets information about a particular RCON command.

Returns:
Type Description
Promise.<RCONCommandInformation>

asyncfetchRCONCommands(){Promise.<(Object|string)>}

Retrieves list of RCON commands.

Returns:
Type Description
Promise.<(Object|string)>

asyncinit(options){Promise.<void>}

Initializes the RCON pool.

Name Type Description
options Object

The pool parameters.

Name Type Default Description
connectionsCount number 2 optional

The number of RCON connections to maintain.

Returns:
Type Description
Promise.<void>

asyncsend(options){Promise.<ResponseMessage>}

Sends an RCON message.

Name Type Description
options Object

The message options.

Name Type Description
name string

Name of the command.

contentBody Object optional

The main content of the message.

Returns:
Type Description
Promise.<ResponseMessage>