samples/JavaScript/http.js
/* Abstract base class for ServerRequest and ClientResponse. */
Abstract base class for ServerRequest and ClientResponse.
Abstract base class for ServerRequest and ClientResponse .
function IncomingMessage(socket) {
  stream.Stream.call(this);
  this.socket = socket;
  this.connection = socket;
  this.httpVersion = null;
  this.complete = false;
  this.headers = {};
  this.trailers = {};
  this.readable = true;
  this._paused = false;
  this._pendings = [];
  this._endEmitted = false;
  this.url = '';
  this.method = null;
  this.statusCode = null;
  this.client = this.socket;
}
function IncomingMessage ( socket ) { stream . Stream . call ( this ) ; this . socket = socket ; this . connection = socket ; this . httpVersion = null ; this . complete = false ; this . headers = { } ; this . trailers = { } ; this . readable = true ; this . _paused = false ; this . _pendings = [ ] ; this . _endEmitted = false ; this . url = '' ; this . method = null ; this . statusCode = null ; this . client = this . socket ; }
Abstract base class for ServerRequest and ClientResponse.
Abstract base class for ServerRequest and ClientResponse .
// TODO Remove one of these eventually. // request (server) only // response (client) only