更新时间:2023-02-08 18:40:01
可以使用exec
调用系统ping命令
You could use exec
to call the system ping command
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { sys.puts(stdout) }
exec("ping -c 3 localhost", puts);