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, services: self.services,
userAgent: self.userAgent, userAgent: self.userAgent,
streamNumbers: self.streamNumbers, streamNumbers: self.streamNumbers,
// This parameters are not used by the remote node so we fake them // This parameters aren't used by the remote node so we fake them
// (because we can't resolve domain name in Browser). // (because we can't resolve domain name in a Browser).
remoteHost: "127.0.0.1", remoteHost: "127.0.0.1",
remotePort: 8444, remotePort: 8444,
})); }));

View File

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