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

@kldzj/rcon

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kldzj/rcon

An easy-to-use RCON client written in TypeScript.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

This package aims to provide a simple and easy to use interface to the RCON TCP and UDP specifications.

Installation

Using yarn:

$ yarn add @kldzj/rcon

Using npm:

$ npm i -S @kldzj/rcon

Usage

import { createConnection, RconProtocol } from '@kldzj/rcon';

const rcon = createConnection({
  host: '127.0.0.1',
  port: 27015,
  password: 'dQw4w9WgXcQ',
  protocol: RconProtocol.UDP,
  // or use RconProtocol.TCP (default)
  challenge: true, // make use of UDP challenge auth
});

// the only way to get responses when using UDP is to use the 'response' event
rcon.on('response', (str) => console.log(str));

await rcon.connect();

// when using TCP, the response is returned as a promise,
// while UDP will simply return the command you put in
const status = await rcon.send('status');

await rcon.send('quit');

// disconnect once you're done
await rcon.disconnect();

FAQs

Package last updated on 31 Aug 2022

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