vmsq
a library for querying valve's master servers with node.js
$ npm install vmsq
usage
vmsq(masterServer :: String, region :: Number, filters? :: Object) → ReadableStream
masterServer
: The master server to query, e.g.hl2master.steampowered.com:27011
region
: Region to query, e.g.0x03
orvmsq.EUROPE
filters
: Optional object that contains filters sent with the query
Returns a ReadableStream
emitting each server as a string one by one.
example
const vmsq = const stream = const servers = stream stream stream
output
88.241.39.16:27015
178.150.208.1:40000
...
got 24 servers
more on filters
\nor[x] A special filter, specifies that servers matching any of the following [x] conditions should not be returned \nand[x] A special filter, specifies that servers matching all of the following [x] conditions should not be returned
nor
and nand
filters are handled in a slightly different way and take an object:
notes
- The master servers appear to be rate-limited, and sometimes stop replying during queries returning large number of servers. This results in a timeout error being emitted.
- Documentation of Master Server Query Protocol