code: function Device (sock1,sock2) {
      var that = this;
      this.sock1= sock1;
      this.sock2 = sock2;
      this.s1 = -1;
      this.s2 = -1;
  
      if(sock1 instanceof Socket) {
          this.s1 = sock1.binding;
  
          if(sock2 instanceof Socket) {
              this.s2 = sock2.binding;
          }
  
          this._timer = setImmediate(function () {
              nn.DeviceWorker(that.s1, that.s2, function (err) {
                  that.emit('error', new Error('lib err: '+ err +'\n'+ nn.Err()));
              });
          });
  
      } else {
          throw new Error('expected at least one Socket argument');
      }
  
      EventEmitter.call(this);
  }
docs: Device implementation