Added Socket#onError

This commit is contained in:
Guillermo Rauch
2012-01-03 13:16:25 -08:00
parent 3fed6df2af
commit d86a766104

View File

@@ -342,6 +342,17 @@ Socket.prototype.close = function () {
return this;
};
/**
* Called upon transport error
*
* @api private
*/
Socket.prototype.onError = function (err) {
this.emit('error', err);
this.onClose('transport error', err);
};
/**
* Called upon transport close.
*