title: Mqtt and Websocket at the same time with Aedes
body: <p>I am trying to make Aedes works as a MQTT broker AND Websocket server. According to that doc: <a href="https://github.com/moscajs/aedes/blob/master/docs/Examples.md" rel="nofollow noreferrer">https://github.com/moscajs/aedes/blob/master/docs/Examples.md</a>
  what i am suppose to understand. Ideally, i want the listener fired up whatever if its a websocket client or a mqtt client.</p>
  
  <p>Is it possible to do something like:</p>
  
  <p>server.broadcast('foo/bar', {data:''})</p>
  
  <p>and all client, websockets and mqtt receive the message ? The doc is not very clear and i am very suprised that websocket-stream is used. It is very low lvl right ?</p>
  
  <p>here some server side code:</p>
  
  <pre><code>    const port = 1883
  
      const aedes = require('aedes')({
  
          persistence: mongoPersistence({
              url: 'mongodb://127.0.0.1/aedes-test',
              // Optional ttl settings
              ttl: {
                  packets: 300, // Number of seconds
                  subscriptions: 300
              }
          }),
          authenticate: (client, username, password, callback) =&gt; {
  
  
  
          },
          authorizePublish: (client, packet, callback) =&gt; {
  
          },
  
          authorizeSubscribe: (client, packet, callback) =&gt; {
  
          }
      });
  
      //const server = require('net').createServer(aedes.handle);
      const httpServer = require('http').createServer()
      const ws = require('websocket-stream')
      ws.createServer({ server: httpServer }, aedes.handle)
  
  
      httpServer.listen(port, function () {
          Logger.debug('Aedes listening on port: ' + port)
          aedes.publish({ topic: 'aedes/hello', payload: "I'm broker " + aedes.id })
      });
  </code></pre>