如题
var client = net.connect(43, server, function() {
client.write(domain + '\n', 'ascii')
})
yields
{ Error: read ECONNRESET
at exports._errnoException (util.js:1050:11)
at TCP.onread (net.js:581:26) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
However,
telnet xxxx 43
yields
telnet xxx 43
Trying xxx...
Connected to xxx.
Escape character is '^]'.
1
fds 2017-04-13 17:07:47 +08:00
telnet 没写东西呀。为了一致,把 client.write() 删掉试试?
|
3
CupTools OP 😂 找到问题了 要'\r\n'不是'\n'
|
4
polun 2017-04-16 22:14:13 +08:00
用`os.EOL`?
|