如何确定 server.HttpResponse 是否停止而不听“结束”或“关闭”事件?
我想要实现的是这样的:
http.createServer(function (request, response) {
var foo; // my event emitting object
// ... something compilated happens here ...
foo.onSomeEvent(function () {
if (response.hasEnded) {
// do something
}
});
});