/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['socket.io/transports/jsonp-polling.js']) {
  _$jscoverage['socket.io/transports/jsonp-polling.js'] = [];
  _$jscoverage['socket.io/transports/jsonp-polling.js'][1] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][3] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][4] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][7] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][9] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][10] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][17] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][18] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][19] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][22] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][23] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][24] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][25] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][27] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][29] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][30] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][31] = 0;
  _$jscoverage['socket.io/transports/jsonp-polling.js'][32] = 0;
}
_$jscoverage['socket.io/transports/jsonp-polling.js'][1]++;
var XHRPolling = require("./xhr-polling");
_$jscoverage['socket.io/transports/jsonp-polling.js'][3]++;
JSONPPolling = module.exports = (function () {
  _$jscoverage['socket.io/transports/jsonp-polling.js'][4]++;
  XHRPolling.apply(this, arguments);
});
_$jscoverage['socket.io/transports/jsonp-polling.js'][7]++;
require("sys").inherits(JSONPPolling, XHRPolling);
_$jscoverage['socket.io/transports/jsonp-polling.js'][9]++;
JSONPPolling.prototype.getOptions = (function () {
  _$jscoverage['socket.io/transports/jsonp-polling.js'][10]++;
  return ({timeout: null, closeTimeout: 8000, duration: 20000});
});
_$jscoverage['socket.io/transports/jsonp-polling.js'][17]++;
JSONPPolling.prototype._onConnect = (function (req, res) {
  _$jscoverage['socket.io/transports/jsonp-polling.js'][18]++;
  this._index = req.url.match(/\/([0-9]+)\/?$/).pop();
  _$jscoverage['socket.io/transports/jsonp-polling.js'][19]++;
  XHRPolling.prototype._onConnect.call(this, req, res);
});
_$jscoverage['socket.io/transports/jsonp-polling.js'][22]++;
JSONPPolling.prototype._write = (function (message) {
  _$jscoverage['socket.io/transports/jsonp-polling.js'][23]++;
  if (this._open) {
    _$jscoverage['socket.io/transports/jsonp-polling.js'][24]++;
    if (this.request.headers.origin && ! this._verifyOrigin(this.request.headers.origin)) {
      _$jscoverage['socket.io/transports/jsonp-polling.js'][25]++;
      message = "alert('Cross domain security restrictions not met');";
    }
    else {
      _$jscoverage['socket.io/transports/jsonp-polling.js'][27]++;
      message = "io.JSONP[" + this._index + "]._(" + JSON.stringify(message) + ");";
    }
    _$jscoverage['socket.io/transports/jsonp-polling.js'][29]++;
    this.response.writeHead(200, {"Content-Type": "text/javascript; charset=UTF-8", "Content-Length": Buffer.byteLength(message)});
    _$jscoverage['socket.io/transports/jsonp-polling.js'][30]++;
    this.response.write(message);
    _$jscoverage['socket.io/transports/jsonp-polling.js'][31]++;
    this.response.end();
    _$jscoverage['socket.io/transports/jsonp-polling.js'][32]++;
    this._onClose();
  }
});
_$jscoverage['socket.io/transports/jsonp-polling.js'].source = ["var XHRPolling = require('./xhr-polling');","","JSONPPolling = module.exports = function(){","  XHRPolling.apply(this, arguments);","};","","require('sys').inherits(JSONPPolling, XHRPolling);","  ","JSONPPolling.prototype.getOptions = function(){","  return {","    timeout: null, // no heartbeats","    closeTimeout: 8000,","    duration: 20000","  };","};","  ","JSONPPolling.prototype._onConnect = function(req, res){","  this._index = req.url.match(/\\/([0-9]+)\\/?$/).pop();","  XHRPolling.prototype._onConnect.call(this, req, res);","};","  ","JSONPPolling.prototype._write = function(message){","  if (this._open){","    if (this.request.headers.origin &amp;&amp; !this._verifyOrigin(this.request.headers.origin)){","      message = \"alert('Cross domain security restrictions not met');\";","    } else {","      message = \"io.JSONP[\"+ this._index +\"]._(\"+ JSON.stringify(message) +\");\";","    }","    this.response.writeHead(200, {'Content-Type': 'text/javascript; charset=UTF-8', 'Content-Length': Buffer.byteLength(message)});","    this.response.write(message);","    this.response.end();","    this._onClose();","  }","};"];
