From: Christian Kaiser Date: 2005-01-11T23:11:18+09:00 Subject: TCPSockets slooooooow Prereq: - Ruby 1.8.1 on Windows - Server and Client, communicating using TCPSockets, using a line-orientated protocol like FTP When the client connects from the same computer, everything is as fast as I would expect it. When the client is on a different computer, it takes minutes to complete even a few lines of protocol. Does anybody have an idea how to change that behaviour? Can there be something wrong? If this is not enough info, please tell me what I should pass on. Christian ----- server.rb: server = TCPServer.new($INTERFACE, $PORT) while ($exitCode == 0 && session = server.accept) ...Thread.new(session) # whatever it does here for the protocol (session.gets, session.puts, ...) end # while ----- client.rb: session = TCPSocket.new(ARGV[0] ? ARGV[0] : 'localhost', ARGV[1] ? ARGV[1].to_i : 64229) puts session.gets .... protocol using session.puts/session.gets