Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thomas-smyth/rcon

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thomas-smyth/rcon

A modern NodeJS library for the Source RCON Protocol

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

RCON library for NodeJS

According to Valve's RCON specification

Forked from RCON-SRCDS and improved for better error handling

Install

npm install rcon-srcds --save

Usage

const server = new Rcon(options);

Options

{
    host: '127.0.0.1',          // Host
    port: 27015,                // Port

    maximumPacketSize: 0,       // Maximum packet bytes (0 = no limit)
    encoding: 'ascii',          // Packet encoding (ascii, utf8)
    timeout: 1000               // ms
}

Remember you can't send a packet larger then 4096 bytes: https://developer.valvesoftware.com/wiki/Source_RCON_Protocol#Packet_Size

Example

const rcon = require('rcon-srcds');
const server = new Rcon({ port: 1337 });

server.authenticate('yourawesomepassword')
    .then(() => {
        console.log('Authenticated');
        return server.execute('status');
    })
    .then(console.log)
    .catch(console.error);

Keywords

FAQs

Package last updated on 07 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc