Fix WS transport default port

This commit is contained in:
Kagami Hiiragi 2015-02-14 18:11:18 +03:00
parent e32e9c23f5
commit f251b3e569
2 changed files with 5 additions and 4 deletions

View File

@ -41,8 +41,8 @@ WsTransport.prototype.connect = function(url, protocols) {
services: self.services,
userAgent: self.userAgent,
streamNumbers: self.streamNumbers,
// This parameters are not used by the remote node so we fake them
// (because we can't resolve domain name in Browser).
// This parameters aren't used by the remote node so we fake them
// (because we can't resolve domain name in a Browser).
remoteHost: "127.0.0.1",
remotePort: 8444,
}));

View File

@ -36,8 +36,8 @@ var unmap = BaseTransport._unmap;
* (bitmessage's by default)
* @param {number[]} opts.streamNumbers - Streams accepted by this node
* (1 by default)
* @param {number} opts.port - Incoming port of this node (8444 by
* default)
* @param {number} opts.port - Incoming port of this node, makes sence
* only on Node platform (18444 by default)
* @constructor
* @static
*/
@ -45,6 +45,7 @@ function WsTransport(opts) {
WsTransport.super_.call(this);
objectAssign(this, opts);
this.seeds = this.seeds || [];
this.port = this.port || 18444;
}
inherits(WsTransport, BaseTransport);