[Groonga-commit] groonga/express-droonga at 25f647d [master] receiver: use util.inherits to inheritance

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Sun Jul 21 17:45:59 JST 2013


Kouhei Sutou	2013-07-21 17:45:59 +0900 (Sun, 21 Jul 2013)

  New Revision: 25f647d67abb4c0ea6ef161f58ed6eab4107a22c
  https://github.com/groonga/express-droonga/commit/25f647d67abb4c0ea6ef161f58ed6eab4107a22c

  Message:
    receiver: use util.inherits to inheritance

  Modified files:
    lib/backend/receiver.js

  Modified: lib/backend/receiver.js (+3 -2)
===================================================================
--- lib/backend/receiver.js    2013-07-21 17:27:19 +0900 (f829fb0)
+++ lib/backend/receiver.js    2013-07-21 17:45:59 +0900 (d4cd589)
@@ -1,4 +1,5 @@
 var debug = require('../debug');
+var util = require('util');
 var net = require('net');
 var EventEmitter = require('events').EventEmitter;
 var msgpack = require('msgpack');
@@ -8,7 +9,7 @@ function MsgPackReceiver(port) {
   this._init();
 }
 
-MsgPackReceiver.prototype = Object.create(EventEmitter.prototype);
+util.inherits(MsgPackReceiver, EventEmitter);
 
 MsgPackReceiver.prototype._init = function() {
   this._id = Date.now();
@@ -66,7 +67,7 @@ function FluentReceiver(port) {
   MsgPackReceiver.apply(this, arguments);
 }
 
-FluentReceiver.prototype = Object.create(MsgPackReceiver.prototype);
+util.inherits(FluentReceiver, MsgPackReceiver);
 
 FluentReceiver.prototype._onMessageReceive = function(packet) {
   MsgPackReceiver.prototype._onMessageReceive.call(this, packet);
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る