From 243c94e3d07afb86f9dd12e37dde0793b76185ee Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 14 Dec 2014 00:11:59 +0100 Subject: [PATCH] server: make onUdpRequest() part of public API As per https://github.com/feross/bittorrent-tracker/pull/48#issuecomment-66893626 --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 8c62089..6c1cb69 100644 --- a/server.js +++ b/server.js @@ -62,7 +62,7 @@ function Server (opts) { // default to starting a udp server unless the user explicitly says no if (opts.udp !== false) { self._udpSocket = dgram.createSocket('udp4') - self._udpSocket.on('message', self._onUdpRequest.bind(self)) + self._udpSocket.on('message', self.onUdpRequest.bind(self)) self._udpSocket.on('error', self._onError.bind(self)) self._udpSocket.on('listening', onListening) } @@ -158,7 +158,7 @@ Server.prototype.onHttpRequest = function (req, res) { }) } -Server.prototype._onUdpRequest = function (msg, rinfo) { +Server.prototype.onUdpRequest = function (msg, rinfo) { var self = this var params