Extend listen to enable IPv6 support.

This commit is contained in:
p-a-c-o 2014-01-21 20:35:49 +01:00
parent 3e47c2485c
commit 96ea631fb6

View File

@ -111,7 +111,7 @@ function ProxyServer(options) {
require('util').inherits(ProxyServer, EE3);
ProxyServer.prototype.listen = function(port) {
ProxyServer.prototype.listen = function(port, hostname) {
var self = this,
closure = function(req, res) { self.web(req, res); };
@ -123,7 +123,7 @@ ProxyServer.prototype.listen = function(port) {
this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); });
}
this._server.listen(port);
this._server.listen(port, hostname);
return this;
};