我在每个线路事件上都收到相同的消息。我收到每条消息的 1 个事件。任何人都知道为什么。这似乎是直截了当的。
var rli = require("readline").createInterface({
input: socket,
output: socket,
terminal: false
});
rli.on("line", handleServerMessage);
function handleServerMessage(msg) {
console.log("Received msg from from server. msg=", msg);
}