this.readable = true;
- this._pendings = [];
- this._pendingIndex = 0;
this.upgrade = null;
// request (server) only
// response (client) only
this.statusCode = null;
this.statusMessage = null;
- this.client = this.socket;
+ this._client = socket; // deprecated
// flag for backwards compatibility grossness.
this._consuming = false;
exports.IncomingMessage = IncomingMessage;
+Object.defineProperty(IncomingMessage.prototype, 'client', {
+ configurable: true,
+ enumerable: true,
+ get: util.deprecate(function() {
+ return this._client;
+ }, 'client is deprecated, use socket or connection instead'),
+ set: util.deprecate(function(val) {
+ this._client = val;
+ }, 'client is deprecated, use socket or connection instead')
+});
IncomingMessage.prototype.setTimeout = function(msecs, callback) {
if (callback)