sorry…that was a mistake…typo error.
both client and server are pointing to the same port 1045.
Actually the code goes this way…
client_side = TCPSocket.new(‘localhost’,‘1045’)
print "Enter some text: "
text=gets()
client_side.write(text)
I am writing the input text to the server side.
An issue I found was that this error occurs only in version 1.8.6.
I tried the same code on version 1.8.1 and it worked, but got a
different error as below.
in ‘recvfrom’ : getnameinfo: ai_family not supported. (SocketError)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.