Socket
Socket
Sign inDemoInstall

requery

Package Overview
Dependencies
2
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    requery

Game server query


Version published
Weekly downloads
11
decreased by-63.33%
Maintainers
1
Install size
137 kB
Created
Weekly downloads
 

Readme

Source

reQuery Game/Master Server Query

Instructions

Require the library and create a new query using the following

var reQ = require('./lib'); // or require('requery');

var query = reQ.query({
    type: 'iw4master', //available types are 'iw4master', 'iw4' for now.
    host: '176.57.141.201',
    port: 20810,
    timeout: 3000,
    parse: true //passing false will return a buffer.
}); //returns a promise

query.then(function(result) {
    console.log(result);
}, function(error) {
    console.log(error);
});

##Creating your own protocol You can create your own protocol by extending the core from the protocols folder.

module.exports = require('../core').extend({
    run: function() {
        return this.udpSend('your query buffer here');
    },
    parse: function(buffer) {
        //If you want to parse your buffer into readable data, you can do it here.
        //Make sure you pass {parse: true} in your options.
    }
})

Keywords

FAQs

Last updated on 14 Nov 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc