Ruby 使用 Net::Ping 连接到指定的 TCP/UDP 端口
- 作者: 阜阳市段委会会长
- 来源: 51数据库
- 2022-08-12
require 'rubygems'
require 'net/ping'
if Net::PingTCP.new('http://www.google.com/', 80).ping
puts "Pong!"
else
puts "No response"
end
推荐阅读
