/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['socket.io/transports/htmlfile.js']) {
  _$jscoverage['socket.io/transports/htmlfile.js'] = [];
  _$jscoverage['socket.io/transports/htmlfile.js'][1] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][4] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][5] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][8] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][10] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][11] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][12] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][14] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][15] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][16] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][17] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][22] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][23] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][24] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][27] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][28] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][30] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][31] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][32] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][33] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][35] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][36] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][37] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][39] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][43] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][44] = 0;
  _$jscoverage['socket.io/transports/htmlfile.js'][45] = 0;
}
_$jscoverage['socket.io/transports/htmlfile.js'][1]++;
var Client = require("../client"), qs = require("querystring");
_$jscoverage['socket.io/transports/htmlfile.js'][4]++;
var HTMLFile = module.exports = (function () {
  _$jscoverage['socket.io/transports/htmlfile.js'][5]++;
  Client.apply(this, arguments);
});
_$jscoverage['socket.io/transports/htmlfile.js'][8]++;
require("sys").inherits(HTMLFile, Client);
_$jscoverage['socket.io/transports/htmlfile.js'][10]++;
HTMLFile.prototype._onConnect = (function (req, res) {
  _$jscoverage['socket.io/transports/htmlfile.js'][11]++;
  var self = this, body = "";
  _$jscoverage['socket.io/transports/htmlfile.js'][12]++;
  switch (req.method) {
  case "GET":
    _$jscoverage['socket.io/transports/htmlfile.js'][14]++;
    Client.prototype._onConnect.call(this, req, res);
    _$jscoverage['socket.io/transports/htmlfile.js'][15]++;
    this.response.useChunkedEncodingByDefault = true;
    _$jscoverage['socket.io/transports/htmlfile.js'][16]++;
    this.response.shouldKeepAlive = true;
    _$jscoverage['socket.io/transports/htmlfile.js'][17]++;
    this.response.writeHead(200, {"Content-Type": "text/html", "Connection": "keep-alive", "Transfer-Encoding": "chunked"});
    _$jscoverage['socket.io/transports/htmlfile.js'][22]++;
    this.response.write("<html><body>" + new Array(245).join(" "));
    _$jscoverage['socket.io/transports/htmlfile.js'][23]++;
    this._payload();
    _$jscoverage['socket.io/transports/htmlfile.js'][24]++;
    break;
  case "POST":
    _$jscoverage['socket.io/transports/htmlfile.js'][27]++;
    req.addListener("data", (function (message) {
  _$jscoverage['socket.io/transports/htmlfile.js'][28]++;
  body += message;
}));
    _$jscoverage['socket.io/transports/htmlfile.js'][30]++;
    req.addListener("end", (function () {
  _$jscoverage['socket.io/transports/htmlfile.js'][31]++;
  try {
    _$jscoverage['socket.io/transports/htmlfile.js'][32]++;
    var msg = qs.parse(body);
    _$jscoverage['socket.io/transports/htmlfile.js'][33]++;
    self._onMessage(msg.data);
  }
  catch (e) {
  }
  _$jscoverage['socket.io/transports/htmlfile.js'][35]++;
  res.writeHead(200, {"Content-Type": "text/plain"});
  _$jscoverage['socket.io/transports/htmlfile.js'][36]++;
  res.write("ok");
  _$jscoverage['socket.io/transports/htmlfile.js'][37]++;
  res.end();
}));
    _$jscoverage['socket.io/transports/htmlfile.js'][39]++;
    break;
  }
});
_$jscoverage['socket.io/transports/htmlfile.js'][43]++;
HTMLFile.prototype._write = (function (message) {
  _$jscoverage['socket.io/transports/htmlfile.js'][44]++;
  if (this._open) {
    _$jscoverage['socket.io/transports/htmlfile.js'][45]++;
    this.response.write("<script>parent.s._(" + JSON.stringify(message) + ", document);</script>");
  }
});
_$jscoverage['socket.io/transports/htmlfile.js'].source = ["var Client = require('../client')","  , qs = require('querystring');","","var HTMLFile = module.exports = function(){","  Client.apply(this, arguments);","};","","require('sys').inherits(HTMLFile, Client);","  ","HTMLFile.prototype._onConnect = function(req, res){","  var self = this, body = '';","  switch (req.method){","    case 'GET':","      Client.prototype._onConnect.call(this, req, res);","      this.response.useChunkedEncodingByDefault = true;","      this.response.shouldKeepAlive = true;","      this.response.writeHead(200, {","        'Content-Type': 'text/html',","        'Connection': 'keep-alive',","        'Transfer-Encoding': 'chunked'","      });","      this.response.write('&lt;html&gt;&lt;body&gt;' + new Array(245).join(' '));","      this._payload();","      break;","      ","    case 'POST':","      req.addListener('data', function(message){","        body += message;","      });","      req.addListener('end', function(){","        try {","          var msg = qs.parse(body);","          self._onMessage(msg.data);","        } catch(e){}","        res.writeHead(200, {'Content-Type': 'text/plain'});","        res.write('ok');","        res.end();","      });","      break;","  }","};","  ","HTMLFile.prototype._write = function(message){","  if (this._open)","    this.response.write('&lt;script&gt;parent.s._('+ JSON.stringify(message) +', document);&lt;/script&gt;'); //json for escaping","};"];
