xmlhttprequest - How can Node.js detect browser side has ended one HTTP session? -


i'm trying implement comet (xhr streaming) node.js. since, xhr streaming make client side xhr.responsetext keep growing, necessary client side close current xhr , restart xhr streaming again.

in server side, each xhr streaming, http.serverresponse object should held until http session over.

the problem is: how can node.js detect browser side has ended 1 http session?

i thought, ideally, there 1 callback argument http.serverresponse.write. writing closed http session trigger callback , let know aborted. but, there no such callback argument.

i think http://socket.io/ need client.on('disconnect', function(){ … })


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -