RCONClient

RCONClient

Represents the RCON client, its connections, and managers.

Constructor

new RCONClient(options)

Parameters:
Name Type Description
options Object The connection parameters.
Name Type Attributes Description
host string <optional>
RCON server host.
port number <optional>
RCON server port.
password string <optional>
RCON server password.

Extends

  • EventEmitter

Members

host :string

Type:
  • string

password :string

Type:
  • string

players :PlayerManager

Type:

pool :PoolManager

Type:

port :number

Type:
  • number

Methods

disconnect()

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

(async) init(options) → {Promise.<void>}

Initializes the RCON pool.
Parameters:
Name Type Description
options Object The pool parameters.
Name Type Attributes Default Description
connectionsCount number <optional>
2 The number of RCON connections to maintain.
Returns:
Type:
Promise.<void>

(async) send(options) → {Promise.<ResponseMessage>}

Sends an RCON message.
Parameters:
Name Type Description
options Object The message options.
Name Type Attributes Description
name string <optional>
Optional name of the command.
contentBody Object <optional>
The main content of the message.
Returns:
Type:
Promise.<ResponseMessage>