mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 10:56:25 +00:00
server: make onUdpRequest() part of public API
As per https://github.com/feross/bittorrent-tracker/pull/48#issuecomment-66893626
This commit is contained in:
parent
e6033db541
commit
243c94e3d0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user