dgram: add socket.fd compatibility hack to dgram_uv.js
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 24 Aug 2011 00:42:49 +0000 (02:42 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Wed, 24 Aug 2011 20:27:25 +0000 (22:27 +0200)
lib/dgram_uv.js

index c06b291..117f871 100644 (file)
@@ -97,6 +97,7 @@ function Socket(type, listener) {
   this._receiving = false;
   this._bound = false;
   this.type = type;
+  this.fd = null; // compatibility hack
 
   if (typeof listener === 'function')
     this.on('message', listener);
@@ -287,6 +288,7 @@ Socket.prototype._stopReceiving = function() {
   this._handle.onmessage = null;
   this._handle.recvStop();
   this._receiving = false;
+  this.fd = null; // compatibility hack
 };