You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
I make one tcp request when user input a line, but the TCP response is usually block until making next a few keystrokes. Tcpdump shows that the response packet has reached the client, but TCP.onread does not fired.
I use node v0.12.2, this is only happen in Mac OSX. Ubuntu is OK
console.log('Type anything then press enter, you should get response from echoServer immediately');console.log('Sometimes TCP.onread may block until you make next keystroke');varnet=require('net');varrl=require('readline').createInterface({input: process.stdin,output: process.stdout,terminal : true,});varsocket=net.createConnection({port : 31017});socket.on('data',function(buf){console.log('=> %s',buf);});rl.on('line',function(line){socket.write(line);}).on('close',function(){socket.end();process.exit(0);});