var server = net.createServer(function(connection) {
console.log('client connected');
connection.on('end', function() {
console.log('客戶端關閉連接');
});
connection.write('Hello World!\r\n');
connection.pipe(connection);
});
server.listen(8080, function() {
console.log('server is listening');
});現在想手動關閉connection,要用什么方法呀,找了好久....
添加回答
舉報
0/150
提交
取消