файл конфигурации

This commit is contained in:
Alexey Kasyanchuk
2017-01-21 00:38:56 +03:00
parent ab9c2eccbb
commit 4a2dcd7d36
3 changed files with 49 additions and 34 deletions

View File

@ -1,5 +1,6 @@
const dgram = require('dgram');
const server = dgram.createSocket("udp4")
const config = require('../config');
const ACTION_CONNECT = 0
const ACTION_ANNOUNCE = 1
@ -117,7 +118,7 @@ server.on("listening", function () {
console.log("listening udp tracker respose on " + address.address + ":" + address.port);
});
server.bind(4446);
server.bind(config.udpTrackersPort);
module.exports = getPeersStatistic;