Demo entry 6347598

   

Submitted by anonymous on Feb 16, 2017 at 08:21
Language: JavaScript. Code size: 253 Bytes.

function brokerPublish (sub, cb) {
  var client = this.client
  var encoded = JSON.stringify(new Sub(client.id, sub.topic, sub.qos))
  var packet = new Packet({
    topic: this.topic,
    payload: encoded
  })
  this.broker.publish(packet, cb)
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).