this._writeQueueFD.push(fd);
}
+ this._onBufferChange();
+
return false;
} else {
// Fast.
this._writeQueueEncoding.unshift(encoding);
this._writeQueueCallbacks.unshift(cb);
this._writeWatcher.start();
+ this._onBufferChange();
queuedData = true;
}
}
this._writeQueue.unshift(leftOver);
this._writeQueueEncoding.unshift(null);
this._writeQueueCallbacks.unshift(cb);
+ this._onBufferChange();
// If didn't successfully write any bytes, enqueue our fd and try again
if (!bytesWritten) {
};
+Socket.prototype._onBufferChange = function() {
+ // Put DTrace hooks here.
+ ;
+};
+
+
// Flushes the write buffer out.
// Returns true if the entire buffer was flushed.
Socket.prototype.flush = function() {
// Only decrement if it's not the END_OF_FILE object...
this.bufferSize -= data.length;
+ this._onBufferChange();
var flushed = this._writeOut(data, encoding, fd, cb);
if (!flushed) return false;