Added basePath option.

This commit is contained in:
Guillermo Rauch
2012-02-27 08:53:11 -03:00
parent 96ac0957f6
commit f651cb45f0

View File

@@ -35,7 +35,8 @@ function Socket (opts) {
this.query = opts.query || {};
this.query.uid = rnd();
this.upgrade = false !== opts.upgrade;
this.path = opts.path || '/engine.io'
this.basePath = opts.basePath || '/engine.io';
this.path = opts.path || '';
this.forceJSONP = !!opts.forceJSONP;
this.flashPath = opts.flashPath || '';
this.transports = opts.transports || ['polling', 'websocket', 'flashsocket'];
@@ -71,7 +72,7 @@ Socket.prototype.createTransport = function (name) {
host: this.host
, port: this.port
, secure: this.secure
, path: this.path
, path: this.basePath + this.path
, query: query
, forceJSONP: this.forceJSONP
, flashPath: this.flashPath