The following code produces an exception in node.js under windows:
var Socket = require("net").Socket;
socket = new Socket();
socket.connect(80, "localhost");
here's the message:
events.js:2083: Uncaught Error: getHostByName ENOTFOUND
When I remove localhost
, it works fine. What could be causing this?
I tried turning the firewall off, but to no effect.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…