Ruby Simple Socket Promgraming
Simple Server Socket require ‘socket’ i = 0; server = TCPServer.new("",2000) loop { i = i+1 Thread.start(server.accept) do |client| client.puts(Time.now.ctime) client.puts "Closing the Connection" client.close puts i.to_s end }require ‘socket’ i = 0; server = TCPServer.new("",2000) loop { i = i+1 Thread.start(server.accept) do |client| client.puts(Time.now.ctime) client.puts "Closing the Connection" client.close puts i.to_s end } […]