Browse Source

Add req.connection and res.connection

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
3546106c43
  1. 5
      lib/http.js

5
lib/http.js

@ -170,7 +170,10 @@ var contentLengthExpression = /Content-Length/i;
function IncomingMessage (socket) {
events.EventEmitter.call(this);
// TODO Remove one of these eventually.
this.socket = socket;
this.connection = socket;
this.httpVersion = null;
this.headers = {};
@ -221,7 +224,9 @@ IncomingMessage.prototype._addHeaderLine = function (field, value) {
function OutgoingMessage (socket) {
events.EventEmitter.call(this, socket);
// TODO Remove one of these eventually.
this.socket = socket;
this.connection = socket;
this.output = [];
this.outputEncodings = [];

Loading…
Cancel
Save