connecting to a simple server on Windows using socket

P

pmr16366

I have a simple server running under Windows using c#
Im trying to connect to it using a ruby client but get the following
error

ai_family not supported. (SocketError)

The c# server is using 'InterNetwork' which means " Address for IP
version 4."
( from
http://msdn.microsoft.com/library/e...socketsaddressfamilyclasstopic.asp?frame=true
)


I can connect fine using a c# client.
The only posts I can see to fix this are several years old and involve
recompiling ruby ( which isnt an option for me)

My client code is:
t = TCPSocket.new( 'pc_name' , 399)
puts t.addr.inspect
puts t.peeraddr.inspect
data = t.recvfrom(30)

I get the error on the last line.
Heres the ful output

["AF_INET", 4281, "pc_name.mshome.net", "192.168.0.100"]
["AF_INET", 399, "pc_name.mshome.net", "192.168.0.100"]
J:/sender.rb:11:in `recvfrom': getnameinfo: ai_family not supported.
(SocketError)


Thanks

Paul
 
K

Kenosis

I too have seen this error for a Ruby 1.8.x distro I build w/all
extenstion on Redhat AS 2.1. I couldn't determine why this was
either. Fortunately, I had other Linux distros to work with and the
others, e.g,., CentOS, worked fine. Hmmmm...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top