Socket do not get any data

Hi

I have one client that read data from one server.

Ruby code is like this


require ‘socket’

s = TCPSocket.new ‘localhost’, 2000

while line = s.gets # Read lines from socket
puts line # and print them
end

s.close # close socket when done


On most client it works.
but on one client I do not get any data from “s.gets”

Is there any way I can check why ?

//H

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs