var data = "";
res.on('data', function (chunk) {
data += chunk;
}) .on("end", function () {
});
如果我不写这个事件监听,是不是nodejs内部还是会emit这个data事件多次?不是很理解这个事件的调用过程求科普
黄舟2017-04-17 13:41:11
Because it needs to set a fixed memory length to receive messages, it does not receive them all at once, but needs to be entered multiple times