You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
var dgram = require("dgram");
|
|
|
|
(function() {
|
|
var server = dgram.createSocket("udp4");
|
|
|
|
server.on("error", function(err) {
|
|
console.log("server error:\n" + err.stack);
|
|
});
|
|
|
|
server.on("message", function(msg, rinfo) {
|
|
// eStats server
|
|
server.send(msg, 0, msg.length, 33702, "176.31.211.227");
|
|
// HLTV server
|
|
server.send(msg, 0, msg.length, 30001, "web5.hltv.org");
|
|
console.log(rinfo.address + ":" + rinfo.port, msg.toString());
|
|
});
|
|
|
|
server.on("listening", function() {
|
|
var address = server.address();
|
|
console.log("server listening " + address.address + ":" + address.port);
|
|
});
|
|
|
|
server.bind(10000);
|
|
})();
|
|
|
|
(function() {
|
|
var server = dgram.createSocket("udp4");
|
|
|
|
server.on("error", function(err) {
|
|
console.log("server error:\n" + err.stack);
|
|
});
|
|
|
|
server.on("message", function(msg, rinfo) {
|
|
// eStats server
|
|
server.send(msg, 0, msg.length, 33702, "176.31.211.227");
|
|
// HLTV server
|
|
server.send(msg, 0, msg.length, 30001, "web5.hltv.org");
|
|
console.log(rinfo.address + ":" + rinfo.port, msg.toString());
|
|
});
|
|
|
|
server.on("listening", function() {
|
|
var address = server.address();
|
|
console.log("server listening " + address.address + ":" + address.port);
|
|
});
|
|
|
|
server.bind(10001);
|
|
})();
|