You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
require 'socket'
|
|
|
|
loop do
|
|
TCPSocket.open('127.0.0.1', 24000) do |sock|
|
|
sock.send("PING\n", 0)
|
|
pong = sock.recv(100)
|
|
puts "client: RECV PONG"
|
|
sock.close
|
|
end
|
|
sleep 0.5
|
|
end
|