1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-11 22:42:42 +03:00

Merge pull request #825 from fintura/emitter

Remove event emitters from the parsers
This commit is contained in:
Ruben Bridgewater
2015-09-12 19:15:38 +02:00
4 changed files with 7 additions and 33 deletions

View File

@@ -1,7 +1,6 @@
'use strict';
var events = require("events"),
util = require("util");
var util = require("util");
function Packet(type, size) {
this.type = type;
@@ -20,8 +19,6 @@ function ReplyParser(options) {
this._reply_type = null;
}
util.inherits(ReplyParser, events.EventEmitter);
exports.Parser = ReplyParser;
function IncompleteReadBuffer(message) {
@@ -286,11 +283,3 @@ ReplyParser.prototype._packetEndOffset = function () {
ReplyParser.prototype._bytesRemaining = function () {
return (this._buffer.length - this._offset) < 0 ? 0 : (this._buffer.length - this._offset);
};
ReplyParser.prototype.send_error = function (reply) {
this.emit("reply error", reply);
};
ReplyParser.prototype.send_reply = function (reply) {
this.emit("reply", reply);
};