‚̧Nuked: Probably Microwaved
    Have ideas to improve npm?Join in the discussion! ¬Ľ

    rcon-server

    0.1.1¬†‚Äʬ†Public¬†‚Äʬ†Published

    ūüĖ• RCON Server

    RCON Server for nodejs

    ⬇ Installation

    $ npm install rcon-server

    ‚ĄĻ Basic Usage Example

     
    const {RCONServer} = require("rcon-server");
     
    process.title = "RCON Server";
     
    const server = new RCONServer({
        port: 3839, // default to 3839
        host: "127.0.0.1", // default to 127.0.0.1
        password: "password", // default to password
        clientLimit: 1, // default to 1
        destroySocketOnLimitExceeded: true, // default to true
        emitAdvancedEvents: false // default to false
    });
     
    server.on("listening",({port, host})=>{
        console.log("Listening..", `${host}:${port}`);
    });
    server.connect();
     
    server.on("commandRequest", (cmd)=>{
        console.log("commandRequest", cmd);
        console.log("New Command Request:", cmd.body);
        d.resolve("Echo: "+d.body);
    })
     
    server.on("login", ({password, successful})=>{
        if (successful) {
            console.log("Client successfully logged in! With password:", password);
        } else {
            console.log("Client login error! With password:", password);
        }
    })
     

    ⬆ Last Update

    • Multiple Socket Connection Support Added.
    • clientLimit option added.
    • destroySocketOnLimitExceeded option added.
    • emitAdvancedEvents option added.
    • getServerInfo changed to getServerSettings
    • getConnectedSocket changed to getConnectedSockets

    Created by KńĪra√ß Armańüan √Ėnal

    Install

    npm i rcon-server

    DownloadsWeekly Downloads

    1

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    10.6 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar