Skip to content

Commit 243c94e

Browse files
committed
server: make onUdpRequest() part of public API
As per webtorrent#48 (comment)
1 parent e6033db commit 243c94e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Server (opts) {
6262
// default to starting a udp server unless the user explicitly says no
6363
if (opts.udp !== false) {
6464
self._udpSocket = dgram.createSocket('udp4')
65-
self._udpSocket.on('message', self._onUdpRequest.bind(self))
65+
self._udpSocket.on('message', self.onUdpRequest.bind(self))
6666
self._udpSocket.on('error', self._onError.bind(self))
6767
self._udpSocket.on('listening', onListening)
6868
}
@@ -158,7 +158,7 @@ Server.prototype.onHttpRequest = function (req, res) {
158158
})
159159
}
160160

161-
Server.prototype._onUdpRequest = function (msg, rinfo) {
161+
Server.prototype.onUdpRequest = function (msg, rinfo) {
162162
var self = this
163163

164164
var params

0 commit comments

Comments
 (0)