Permalink
Browse files

Re-emit 'drain' from tcp socket

  • Loading branch information...
1 parent c8db0e6 commit 5bfb1fccbb6b940474d1e3128648ef5ac400cbc3 @andris9 committed Jan 28, 2014
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/client.js
View
@@ -213,6 +213,8 @@ SMTPClient.prototype.connect = function(){
}).bind(this), this.options.connectionTimeout);
}
+ this.socket.on("drain", this._onDrain.bind(this));
+
this.socket.on("error", this._onError.bind(this));
};
@@ -362,6 +364,16 @@ SMTPClient.prototype._onError = function(err, type, data){
};
/**
+ * <p>'drain' listener for the socket</p>
+ *
+ * @event
+ */
+SMTPClient.prototype._onDrain = function(){
+ this.emit("drain");
+};
+
+
+/**
* <p>'close' listener for the socket</p>
*
* @event

0 comments on commit 5bfb1fc

Please sign in to comment.