mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-14 11:26:25 +00:00
add server.ws.address() function
This commit is contained in:
parent
907691b914
commit
82aea33dfa
@ -97,6 +97,7 @@ function Server (opts) {
|
|||||||
self.http.on('listening', onListening)
|
self.http.on('listening', onListening)
|
||||||
}
|
}
|
||||||
self.ws = new WebSocketServer({ server: self.http })
|
self.ws = new WebSocketServer({ server: self.http })
|
||||||
|
self.ws.address = self.http.address.bind(self.http)
|
||||||
self.ws.on('error', function (err) { self._onError(err) })
|
self.ws.on('error', function (err) { self._onError(err) })
|
||||||
self.ws.on('connection', function (socket) { self.onWebSocketConnection(socket) })
|
self.ws.on('connection', function (socket) { self.onWebSocketConnection(socket) })
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user