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
Post a Comment