code: function HookBackendEvent (adapter, backend, socket) {
      
      function String2Hash (str) {
          var hash = 5381;
          var i = str.length;
  
          while(i) hash = (hash * 33) ^ str.charCodeAt(--i);
  
          /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
           * integers. Since we want the results to be always positive, convert the
           * signed int to an unsigned by doing an unsigned bitshift. 
           */
          
          return hash >>> 0;
      }
      
      // if no MMSI avaliable let's try to build a fakeone
      function EventDevAuth (device){
          if (!device.mmsi)  device.mmsi = parseInt (device.devid);
          if (isNaN (device.mmsi)) device.mmsi=String2Hash(device.devid);
          adapter.BroadcastStatic (device);
          if (device.stamp) adapter.BroadcastPos (device);
      };    
      
      function EventDevQuit (device){
      };    
  
      // Events successful process by tracker adapter
      function EventDevPos (device){
           
          // force push of full device info every 20 positions update
          if (device.aisproxy >= 20) adapter.BroadcastStatic (device);
          if ((new Date().getTime() - device.laststatics) > 900000) adapter.BroadcastStatic (device); // force statics every 15mn
          adapter.BroadcastPos (device);
      };
      
      backend.event.on("dev-auth",EventDevAuth);	
      backend.event.on("dev-pos" ,EventDevPos);	
      backend.event.on("dev-ign" ,EventDevPos);	
      backend.event.on("dev-alrm",EventDevPos);	
      backend.event.on("dev-quit",EventDevQuit);	
  }
docs: hook user event handler to receive a copy of messages