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