connecting to a simple server on Windows using socket

Discussion in 'Ruby' started by pmr16366@gmail.com, Apr 10, 2006.

  1. Guest

    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
    , Apr 10, 2006
    #1
    1. Advertising

  2. Codemonk Guest

    Sorry man, you're going to have to change your last name to get this to
    work :(
    Codemonk, Apr 10, 2006
    #2
    1. Advertising

  3. Kenosis Guest

    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...
    Kenosis, Apr 10, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy
    Replies:
    1
    Views:
    4,816
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    965
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    545
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    661
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    715
Loading...

Share This Page