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,要用什么方法呀,找了好久....
长风秋雁
jeck猫
随时随地看视频慕课网APP
相关分类