lemmon
v0.0.1
Published
long polling handler
Downloads
3
Readme
Lemmon
a Small and simple wrapper to stream Comet connections from the server to the client. Named after the Lemmon Comet
usage
Be aware that Lemmon sends strings or JSON object
server:
var http = require('http')
var Lemmon = require('lemmon')
http.createServer(function (req, res) {
var comet = Lemmon(res, 3e4)
var stream = db.getStream()
stream.on('data', function (obj) {
comet.write(obj)
})
stream.on('end', function () {
comet.end()
})
})
client:
// todo
License
MIT