how to make a client server connection in ruby
https://null-byte.wonderhowto.com/how-to/make-client-server-connection-ruby-0163748/
https://www.educative.io/answers/how-to-build-a-simple-server-in-ruby
https://blog.appsignal.com/2016/11/23/ruby-magic-building-a-30-line-http-server-in-ruby.html
create the two files ::
1. ruby-client.rb
2. ruby-server.rb
1. ruby-client.rb ::
require 'socket'
hostname = 'localhost'
port = 2000
s = TCPSocket.open(hostname,port)
while line = s.gets
Comments
Post a Comment