Constructor
new RequestMessage(connection, options)
Parameters:
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
connection |
RCONConnection
|
The connection this message belongs to. | ||||||||||||||||
options |
Object
|
The message configuration.
|
Members
contentBody :string
Type:
-
string
id :number
Type:
-
number
name :string
Type:
-
string
version :number
Type:
-
number
Methods
toBuffer() → {Buffer}
Wraps this RequestMessage in an encrypted buffer to be directly sent through the socket.
Throws:
-
Throws if the XOR key is missing.
- Type
-
Error
Returns:
- Type:
-
Buffer
The encrypted buffer ready for transmission.
toUnencryptedBuffer() → {Buffer}
Wraps this RequestMessage in an unencrypted buffer to be directly sent through the socket.
Returns:
- Type:
-
Buffer
The formatted unencrypted buffer.