require 'socket'
server = TCPServer.new(12321)

while (connection = server.accept)
  Thread.new(connection) do |conn|
    port, host = conn.peeraddr[1,2]
    client = 
    puts 
    begin
      loop do
        line = conn.readline
        puts 
        conn.puts(line)
      end
    rescue EOFError
      conn.close
      puts 
    end
  end
end