/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['socket.io/client.js']) {
  _$jscoverage['socket.io/client.js'] = [];
  _$jscoverage['socket.io/client.js'][1] = 0;
  _$jscoverage['socket.io/client.js'][9] = 0;
  _$jscoverage['socket.io/client.js'][10] = 0;
  _$jscoverage['socket.io/client.js'][11] = 0;
  _$jscoverage['socket.io/client.js'][12] = 0;
  _$jscoverage['socket.io/client.js'][17] = 0;
  _$jscoverage['socket.io/client.js'][18] = 0;
  _$jscoverage['socket.io/client.js'][19] = 0;
  _$jscoverage['socket.io/client.js'][20] = 0;
  _$jscoverage['socket.io/client.js'][21] = 0;
  _$jscoverage['socket.io/client.js'][22] = 0;
  _$jscoverage['socket.io/client.js'][25] = 0;
  _$jscoverage['socket.io/client.js'][27] = 0;
  _$jscoverage['socket.io/client.js'][28] = 0;
  _$jscoverage['socket.io/client.js'][29] = 0;
  _$jscoverage['socket.io/client.js'][31] = 0;
  _$jscoverage['socket.io/client.js'][32] = 0;
  _$jscoverage['socket.io/client.js'][35] = 0;
  _$jscoverage['socket.io/client.js'][36] = 0;
  _$jscoverage['socket.io/client.js'][37] = 0;
  _$jscoverage['socket.io/client.js'][38] = 0;
  _$jscoverage['socket.io/client.js'][41] = 0;
  _$jscoverage['socket.io/client.js'][42] = 0;
  _$jscoverage['socket.io/client.js'][43] = 0;
  _$jscoverage['socket.io/client.js'][44] = 0;
  _$jscoverage['socket.io/client.js'][45] = 0;
  _$jscoverage['socket.io/client.js'][46] = 0;
  _$jscoverage['socket.io/client.js'][48] = 0;
  _$jscoverage['socket.io/client.js'][50] = 0;
  _$jscoverage['socket.io/client.js'][51] = 0;
  _$jscoverage['socket.io/client.js'][53] = 0;
  _$jscoverage['socket.io/client.js'][54] = 0;
  _$jscoverage['socket.io/client.js'][58] = 0;
  _$jscoverage['socket.io/client.js'][59] = 0;
  _$jscoverage['socket.io/client.js'][61] = 0;
  _$jscoverage['socket.io/client.js'][62] = 0;
  _$jscoverage['socket.io/client.js'][63] = 0;
  _$jscoverage['socket.io/client.js'][65] = 0;
  _$jscoverage['socket.io/client.js'][66] = 0;
  _$jscoverage['socket.io/client.js'][69] = 0;
  _$jscoverage['socket.io/client.js'][70] = 0;
  _$jscoverage['socket.io/client.js'][71] = 0;
  _$jscoverage['socket.io/client.js'][73] = 0;
  _$jscoverage['socket.io/client.js'][74] = 0;
  _$jscoverage['socket.io/client.js'][76] = 0;
  _$jscoverage['socket.io/client.js'][77] = 0;
  _$jscoverage['socket.io/client.js'][80] = 0;
  _$jscoverage['socket.io/client.js'][84] = 0;
  _$jscoverage['socket.io/client.js'][85] = 0;
  _$jscoverage['socket.io/client.js'][87] = 0;
  _$jscoverage['socket.io/client.js'][88] = 0;
  _$jscoverage['socket.io/client.js'][89] = 0;
  _$jscoverage['socket.io/client.js'][91] = 0;
  _$jscoverage['socket.io/client.js'][92] = 0;
  _$jscoverage['socket.io/client.js'][93] = 0;
  _$jscoverage['socket.io/client.js'][94] = 0;
  _$jscoverage['socket.io/client.js'][97] = 0;
  _$jscoverage['socket.io/client.js'][98] = 0;
  _$jscoverage['socket.io/client.js'][100] = 0;
  _$jscoverage['socket.io/client.js'][101] = 0;
  _$jscoverage['socket.io/client.js'][102] = 0;
  _$jscoverage['socket.io/client.js'][105] = 0;
  _$jscoverage['socket.io/client.js'][106] = 0;
  _$jscoverage['socket.io/client.js'][107] = 0;
  _$jscoverage['socket.io/client.js'][108] = 0;
  _$jscoverage['socket.io/client.js'][109] = 0;
  _$jscoverage['socket.io/client.js'][110] = 0;
  _$jscoverage['socket.io/client.js'][115] = 0;
  _$jscoverage['socket.io/client.js'][116] = 0;
  _$jscoverage['socket.io/client.js'][117] = 0;
  _$jscoverage['socket.io/client.js'][118] = 0;
  _$jscoverage['socket.io/client.js'][122] = 0;
  _$jscoverage['socket.io/client.js'][123] = 0;
  _$jscoverage['socket.io/client.js'][124] = 0;
  _$jscoverage['socket.io/client.js'][125] = 0;
  _$jscoverage['socket.io/client.js'][126] = 0;
  _$jscoverage['socket.io/client.js'][127] = 0;
  _$jscoverage['socket.io/client.js'][128] = 0;
  _$jscoverage['socket.io/client.js'][129] = 0;
  _$jscoverage['socket.io/client.js'][130] = 0;
  _$jscoverage['socket.io/client.js'][132] = 0;
  _$jscoverage['socket.io/client.js'][133] = 0;
  _$jscoverage['socket.io/client.js'][134] = 0;
  _$jscoverage['socket.io/client.js'][135] = 0;
  _$jscoverage['socket.io/client.js'][136] = 0;
  _$jscoverage['socket.io/client.js'][137] = 0;
  _$jscoverage['socket.io/client.js'][140] = 0;
  _$jscoverage['socket.io/client.js'][144] = 0;
  _$jscoverage['socket.io/client.js'][145] = 0;
  _$jscoverage['socket.io/client.js'][146] = 0;
  _$jscoverage['socket.io/client.js'][147] = 0;
  _$jscoverage['socket.io/client.js'][148] = 0;
  _$jscoverage['socket.io/client.js'][149] = 0;
  _$jscoverage['socket.io/client.js'][150] = 0;
  _$jscoverage['socket.io/client.js'][151] = 0;
  _$jscoverage['socket.io/client.js'][152] = 0;
  _$jscoverage['socket.io/client.js'][156] = 0;
  _$jscoverage['socket.io/client.js'][157] = 0;
  _$jscoverage['socket.io/client.js'][158] = 0;
  _$jscoverage['socket.io/client.js'][159] = 0;
  _$jscoverage['socket.io/client.js'][162] = 0;
  _$jscoverage['socket.io/client.js'][163] = 0;
  _$jscoverage['socket.io/client.js'][164] = 0;
  _$jscoverage['socket.io/client.js'][165] = 0;
  _$jscoverage['socket.io/client.js'][168] = 0;
  _$jscoverage['socket.io/client.js'][169] = 0;
  _$jscoverage['socket.io/client.js'][170] = 0;
  _$jscoverage['socket.io/client.js'][171] = 0;
  _$jscoverage['socket.io/client.js'][173] = 0;
  _$jscoverage['socket.io/client.js'][174] = 0;
  _$jscoverage['socket.io/client.js'][175] = 0;
  _$jscoverage['socket.io/client.js'][176] = 0;
  _$jscoverage['socket.io/client.js'][181] = 0;
  _$jscoverage['socket.io/client.js'][184] = 0;
}
_$jscoverage['socket.io/client.js'][1]++;
var urlparse = require("url").parse, OutgoingMessage = require("http").OutgoingMessage, Stream = require("net").Stream, options = require("./utils").options, encode = require("./utils").encode, decode = require("./utils").decode, merge = require("./utils").merge;
_$jscoverage['socket.io/client.js'][9]++;
var Client = module.exports = (function (listener, req, res, options, head) {
  _$jscoverage['socket.io/client.js'][10]++;
  process.EventEmitter.call(this);
  _$jscoverage['socket.io/client.js'][11]++;
  this.listener = listener;
  _$jscoverage['socket.io/client.js'][12]++;
  this.options(merge({timeout: 8000, heartbeatInterval: 10000, closeTimeout: 0}, this.getOptions? this.getOptions(): {}), options);
  _$jscoverage['socket.io/client.js'][17]++;
  this.connections = 0;
  _$jscoverage['socket.io/client.js'][18]++;
  this._open = false;
  _$jscoverage['socket.io/client.js'][19]++;
  this._heartbeats = 0;
  _$jscoverage['socket.io/client.js'][20]++;
  this.connected = false;
  _$jscoverage['socket.io/client.js'][21]++;
  this.upgradeHead = head;
  _$jscoverage['socket.io/client.js'][22]++;
  this._onConnect(req, res);
});
_$jscoverage['socket.io/client.js'][25]++;
require("sys").inherits(Client, process.EventEmitter);
_$jscoverage['socket.io/client.js'][27]++;
Client.prototype.send = (function (message) {
  _$jscoverage['socket.io/client.js'][28]++;
  if (! this._open || ! (this.connection.readyState === "open" || this.connection.readyState === "writeOnly")) {
    _$jscoverage['socket.io/client.js'][29]++;
    return this._queue(message);
  }
  _$jscoverage['socket.io/client.js'][31]++;
  this._write(encode(message));
  _$jscoverage['socket.io/client.js'][32]++;
  return this;
});
_$jscoverage['socket.io/client.js'][35]++;
Client.prototype.broadcast = (function (message) {
  _$jscoverage['socket.io/client.js'][36]++;
  if (! ("sessionId" in this)) {
    _$jscoverage['socket.io/client.js'][36]++;
    return this;
  }
  _$jscoverage['socket.io/client.js'][37]++;
  this.listener.broadcast(message, this.sessionId);
  _$jscoverage['socket.io/client.js'][38]++;
  return this;
});
_$jscoverage['socket.io/client.js'][41]++;
Client.prototype._onMessage = (function (data) {
  _$jscoverage['socket.io/client.js'][42]++;
  var messages = decode(data);
  _$jscoverage['socket.io/client.js'][43]++;
  if (messages === false) {
    _$jscoverage['socket.io/client.js'][43]++;
    return this.listener.options.log("Bad message received from client " + this.sessionId);
  }
  _$jscoverage['socket.io/client.js'][44]++;
  for (var i = 0, l = messages.length, frame; i < l; i++) {
    _$jscoverage['socket.io/client.js'][45]++;
    frame = messages[i].substr(0, 3);
    _$jscoverage['socket.io/client.js'][46]++;
    switch (frame) {
    case "~h~":
      _$jscoverage['socket.io/client.js'][48]++;
      return this._onHeartbeat(messages[i].substr(3));
    case "~j~":
      _$jscoverage['socket.io/client.js'][50]++;
      messages[i] = JSON.parse(messages[i].substr(3));
      _$jscoverage['socket.io/client.js'][51]++;
      break;
    }
    _$jscoverage['socket.io/client.js'][53]++;
    this.emit("message", messages[i]);
    _$jscoverage['socket.io/client.js'][54]++;
    this.listener._onClientMessage(messages[i], this);
}
});
_$jscoverage['socket.io/client.js'][58]++;
Client.prototype._onConnect = (function (req, res) {
  _$jscoverage['socket.io/client.js'][59]++;
  var self = this;
  _$jscoverage['socket.io/client.js'][61]++;
  this.request = req;
  _$jscoverage['socket.io/client.js'][62]++;
  this.response = res;
  _$jscoverage['socket.io/client.js'][63]++;
  this.connection = req.connection;
  _$jscoverage['socket.io/client.js'][65]++;
  this.connection.addListener("end", (function () {
  _$jscoverage['socket.io/client.js'][66]++;
  self._onClose();
}));
  _$jscoverage['socket.io/client.js'][69]++;
  if (req) {
    _$jscoverage['socket.io/client.js'][70]++;
    req.addListener("error", (function (err) {
  _$jscoverage['socket.io/client.js'][71]++;
  req.end && req.end() || req.destroy && req.destroy();
}));
    _$jscoverage['socket.io/client.js'][73]++;
    if (res) {
      _$jscoverage['socket.io/client.js'][73]++;
      res.addListener("error", (function (err) {
  _$jscoverage['socket.io/client.js'][74]++;
  res.end && res.end() || res.destroy && res.destroy();
}));
    }
    _$jscoverage['socket.io/client.js'][76]++;
    req.connection.addListener("error", (function (err) {
  _$jscoverage['socket.io/client.js'][77]++;
  req.connection.end && req.connection.end() || req.connection.destroy && req.connection.destroy();
}));
    _$jscoverage['socket.io/client.js'][80]++;
    if (this._disconnectTimeout) {
      _$jscoverage['socket.io/client.js'][80]++;
      clearTimeout(this._disconnectTimeout);
    }
  }
});
_$jscoverage['socket.io/client.js'][84]++;
Client.prototype._payload = (function () {
  _$jscoverage['socket.io/client.js'][85]++;
  var payload = [];
  _$jscoverage['socket.io/client.js'][87]++;
  this.connections++;
  _$jscoverage['socket.io/client.js'][88]++;
  this.connected = true;
  _$jscoverage['socket.io/client.js'][89]++;
  this._open = true;
  _$jscoverage['socket.io/client.js'][91]++;
  if (! this.handshaked) {
    _$jscoverage['socket.io/client.js'][92]++;
    this._generateSessionId();
    _$jscoverage['socket.io/client.js'][93]++;
    payload.push(this.sessionId);
    _$jscoverage['socket.io/client.js'][94]++;
    this.handshaked = true;
  }
  _$jscoverage['socket.io/client.js'][97]++;
  payload = payload.concat(this._writeQueue || []);
  _$jscoverage['socket.io/client.js'][98]++;
  this._writeQueue = [];
  _$jscoverage['socket.io/client.js'][100]++;
  if (payload.length) {
    _$jscoverage['socket.io/client.js'][100]++;
    this._write(encode(payload));
  }
  _$jscoverage['socket.io/client.js'][101]++;
  if (this.connections === 1) {
    _$jscoverage['socket.io/client.js'][101]++;
    this.listener._onClientConnect(this);
  }
  _$jscoverage['socket.io/client.js'][102]++;
  if (this.options.timeout) {
    _$jscoverage['socket.io/client.js'][102]++;
    this._heartbeat();
  }
});
_$jscoverage['socket.io/client.js'][105]++;
Client.prototype._heartbeat = (function () {
  _$jscoverage['socket.io/client.js'][106]++;
  var self = this;
  _$jscoverage['socket.io/client.js'][107]++;
  this._heartbeatInterval = setTimeout((function () {
  _$jscoverage['socket.io/client.js'][108]++;
  self.send("~h~" + ++self._heartbeats);
  _$jscoverage['socket.io/client.js'][109]++;
  self._heartbeatTimeout = setTimeout((function () {
  _$jscoverage['socket.io/client.js'][110]++;
  self._onClose();
}), self.options.timeout);
}), self.options.heartbeatInterval);
});
_$jscoverage['socket.io/client.js'][115]++;
Client.prototype._onHeartbeat = (function (h) {
  _$jscoverage['socket.io/client.js'][116]++;
  if (h == this._heartbeats) {
    _$jscoverage['socket.io/client.js'][117]++;
    clearTimeout(this._heartbeatTimeout);
    _$jscoverage['socket.io/client.js'][118]++;
    this._heartbeat();
  }
});
_$jscoverage['socket.io/client.js'][122]++;
Client.prototype._onClose = (function (skipDisconnect) {
  _$jscoverage['socket.io/client.js'][123]++;
  var self = this;
  _$jscoverage['socket.io/client.js'][124]++;
  if (this._heartbeatInterval) {
    _$jscoverage['socket.io/client.js'][124]++;
    clearTimeout(this._heartbeatInterval);
  }
  _$jscoverage['socket.io/client.js'][125]++;
  if (this._heartbeatTimeout) {
    _$jscoverage['socket.io/client.js'][125]++;
    clearTimeout(this._heartbeatTimeout);
  }
  _$jscoverage['socket.io/client.js'][126]++;
  this._open = false;
  _$jscoverage['socket.io/client.js'][127]++;
  if (this.connection) {
    _$jscoverage['socket.io/client.js'][128]++;
    this.connection.end();
    _$jscoverage['socket.io/client.js'][129]++;
    this.connection.destroy();
    _$jscoverage['socket.io/client.js'][130]++;
    this.connection = null;
  }
  _$jscoverage['socket.io/client.js'][132]++;
  this.request = null;
  _$jscoverage['socket.io/client.js'][133]++;
  this.response = null;
  _$jscoverage['socket.io/client.js'][134]++;
  if (skipDisconnect !== false) {
    _$jscoverage['socket.io/client.js'][135]++;
    if (this.handshaked) {
      _$jscoverage['socket.io/client.js'][136]++;
      this._disconnectTimeout = setTimeout((function () {
  _$jscoverage['socket.io/client.js'][137]++;
  self._onDisconnect();
}), this.options.closeTimeout);
    }
    else {
      _$jscoverage['socket.io/client.js'][140]++;
      this._onDisconnect();
    }
  }
});
_$jscoverage['socket.io/client.js'][144]++;
Client.prototype._onDisconnect = (function () {
  _$jscoverage['socket.io/client.js'][145]++;
  if (this._open) {
    _$jscoverage['socket.io/client.js'][145]++;
    this._onClose(true);
  }
  _$jscoverage['socket.io/client.js'][146]++;
  if (this._disconnectTimeout) {
    _$jscoverage['socket.io/client.js'][146]++;
    clearTimeout(this._disconnectTimeout);
  }
  _$jscoverage['socket.io/client.js'][147]++;
  this._writeQueue = [];
  _$jscoverage['socket.io/client.js'][148]++;
  this.connected = false;
  _$jscoverage['socket.io/client.js'][149]++;
  if (this.handshaked) {
    _$jscoverage['socket.io/client.js'][150]++;
    this.emit("disconnect");
    _$jscoverage['socket.io/client.js'][151]++;
    this.listener._onClientDisconnect(this);
    _$jscoverage['socket.io/client.js'][152]++;
    this.handshaked = false;
  }
});
_$jscoverage['socket.io/client.js'][156]++;
Client.prototype._queue = (function (message) {
  _$jscoverage['socket.io/client.js'][157]++;
  this._writeQueue = this._writeQueue || [];
  _$jscoverage['socket.io/client.js'][158]++;
  this._writeQueue.push(message);
  _$jscoverage['socket.io/client.js'][159]++;
  return this;
});
_$jscoverage['socket.io/client.js'][162]++;
Client.prototype._generateSessionId = (function () {
  _$jscoverage['socket.io/client.js'][163]++;
  if (this.sessionId) {
    _$jscoverage['socket.io/client.js'][163]++;
    return this.listener.options.log("This client already has a session id");
  }
  _$jscoverage['socket.io/client.js'][164]++;
  this.sessionId = Math.random().toString().substr(2);
  _$jscoverage['socket.io/client.js'][165]++;
  return this;
});
_$jscoverage['socket.io/client.js'][168]++;
Client.prototype._verifyOrigin = (function (origin) {
  _$jscoverage['socket.io/client.js'][169]++;
  var origins = this.listener.options.origins;
  _$jscoverage['socket.io/client.js'][170]++;
  if (origins.indexOf("*:*") !== -1) {
    _$jscoverage['socket.io/client.js'][171]++;
    return true;
  }
  _$jscoverage['socket.io/client.js'][173]++;
  if (origin) {
    _$jscoverage['socket.io/client.js'][174]++;
    try {
      _$jscoverage['socket.io/client.js'][175]++;
      var parts = urlparse(origin);
      _$jscoverage['socket.io/client.js'][176]++;
      return origins.indexOf(parts.host + ":" + parts.port) !== -1 || origins.indexOf(parts.host + ":*") !== -1 || origins.indexOf("*:" + parts.port) !== -1;
    }
    catch (ex) {
    }
  }
  _$jscoverage['socket.io/client.js'][181]++;
  return false;
});
_$jscoverage['socket.io/client.js'][184]++;
for (var i in options) {
  _$jscoverage['socket.io/client.js'][184]++;
  Client.prototype[i] = options[i];
}
_$jscoverage['socket.io/client.js'].source = ["var urlparse = require('url').parse","  , OutgoingMessage = require('http').OutgoingMessage","  , Stream = require('net').Stream","  , options = require('./utils').options","  , encode = require('./utils').encode","  , decode = require('./utils').decode","  , merge = require('./utils').merge;","","var Client = module.exports = function(listener, req, res, options, head){","  process.EventEmitter.call(this);","  this.listener = listener;","  this.options(merge({","    timeout: 8000,","    heartbeatInterval: 10000,","    closeTimeout: 0","  }, this.getOptions ? this.getOptions() : {}), options);","  this.connections = 0;","  this._open = false;","  this._heartbeats = 0;","  this.connected = false;","  this.upgradeHead = head;","  this._onConnect(req, res);","};","","require('sys').inherits(Client, process.EventEmitter);","","Client.prototype.send = function(message){","  if (!this._open || !(this.connection.readyState === 'open' || this.connection.readyState === 'writeOnly')){","    return this._queue(message);","  }","  this._write(encode(message));","  return this;","};","","Client.prototype.broadcast = function(message){","  if (!('sessionId' in this)) return this;","  this.listener.broadcast(message, this.sessionId);","  return this;","};","","Client.prototype._onMessage = function(data){","  var messages = decode(data);","  if (messages === false) return this.listener.options.log('Bad message received from client ' + this.sessionId);","  for (var i = 0, l = messages.length, frame; i &lt; l; i++){","    frame = messages[i].substr(0, 3);","    switch (frame){","      case '~h~':","        return this._onHeartbeat(messages[i].substr(3));","      case '~j~':","        messages[i] = JSON.parse(messages[i].substr(3));","        break;","    }","    this.emit('message', messages[i]);","    this.listener._onClientMessage(messages[i], this);","  }","};","","Client.prototype._onConnect = function(req, res){","  var self = this;","  ","  this.request = req;","  this.response = res;","  this.connection = req.connection;","  ","  this.connection.addListener('end', function(){","    self._onClose();","  });","  ","  if (req){","    req.addListener('error', function(err){","      req.end &amp;&amp; req.end() || req.destroy &amp;&amp; req.destroy();","    });","    if (res) res.addListener('error', function(err){","      res.end &amp;&amp; res.end() || res.destroy &amp;&amp; res.destroy();","    });","    req.connection.addListener('error', function(err){","      req.connection.end &amp;&amp; req.connection.end() || req.connection.destroy &amp;&amp; req.connection.destroy();","    });","    ","    if (this._disconnectTimeout) clearTimeout(this._disconnectTimeout);","  }","};","","Client.prototype._payload = function(){","  var payload = [];","  ","  this.connections++;","  this.connected = true;","  this._open = true;","  ","  if (!this.handshaked){","    this._generateSessionId();","    payload.push(this.sessionId);","    this.handshaked = true;","  }","  ","  payload = payload.concat(this._writeQueue || []);","  this._writeQueue = [];","","  if (payload.length) this._write(encode(payload));","  if (this.connections === 1) this.listener._onClientConnect(this);","  if (this.options.timeout) this._heartbeat();","};","  ","Client.prototype._heartbeat = function(){","  var self = this;","  this._heartbeatInterval = setTimeout(function(){","    self.send('~h~' + ++self._heartbeats);","    self._heartbeatTimeout = setTimeout(function(){","      self._onClose();","    }, self.options.timeout);","  }, self.options.heartbeatInterval);","};","  ","Client.prototype._onHeartbeat = function(h){","  if (h == this._heartbeats){","    clearTimeout(this._heartbeatTimeout);","    this._heartbeat();","  }","};","","Client.prototype._onClose = function(skipDisconnect){","  var self = this;","  if (this._heartbeatInterval) clearTimeout(this._heartbeatInterval);","  if (this._heartbeatTimeout) clearTimeout(this._heartbeatTimeout);","  this._open = false;","  if (this.connection){","    this.connection.end();","    this.connection.destroy();","    this.connection = null;","  }","  this.request = null;","  this.response = null;","  if (skipDisconnect !== false){","    if (this.handshaked){","      this._disconnectTimeout = setTimeout(function(){","        self._onDisconnect();","      }, this.options.closeTimeout);","    } else","      this._onDisconnect();","  }","};","","Client.prototype._onDisconnect = function(){","  if (this._open) this._onClose(true);","  if (this._disconnectTimeout) clearTimeout(this._disconnectTimeout);","  this._writeQueue = [];","  this.connected = false;","  if (this.handshaked){","    this.emit('disconnect');","    this.listener._onClientDisconnect(this);","    this.handshaked = false;","  }","};","","Client.prototype._queue = function(message){","  this._writeQueue = this._writeQueue || [];","  this._writeQueue.push(message);","  return this;","};","","Client.prototype._generateSessionId = function(){","  if (this.sessionId) return this.listener.options.log('This client already has a session id');","  this.sessionId = Math.random().toString().substr(2);","  return this;","};","","Client.prototype._verifyOrigin = function(origin){","  var origins = this.listener.options.origins;","  if (origins.indexOf('*:*') !== -1) {","    return true;","  }","  if (origin) {","    try {","      var parts = urlparse(origin);","      return origins.indexOf(parts.host + ':' + parts.port) !== -1 ||","          origins.indexOf(parts.host + ':*') !== -1 ||","          origins.indexOf('*:' + parts.port) !== -1;  ","    } catch (ex) {}","  }","  return false;","};","","for (var i in options) Client.prototype[i] = options[i];"];
