From: Joel VanderWerf Date: 2008-01-04T03:20:23+09:00 Subject: Re: [OT] Help Request: Dialup, CardBus Cell Phone, etc. Modem IP Loopback Test Bill Kelly wrote: > Rubyists, > > If any of you having a "not-always-on" internet connection would > be willing to try my test program on your systems, I'd be most > grateful: > > http://tastyspleen.net/~billk/ruby/loopback-test/ > > Years ago, some colleagues and I learned that some operating > systems can attempt to dial out to establish an internet connection, > even when a program is only trying to do inter-process communication > using the IP stack over loopback (localhost). I am hoping that this > has changed in the intervening years. Did you rule out DNS lookups? Try setting Socket.do_not_reverse_lookup=true. Pickaxe II on Socket#addr: Returns the domain, port, name, and IP address of sock as a four-element array. The name will be returned as an address if the do_not_reverse_lookup flag is true. u = UDPSocket.new u.bind('localhost', 8765) u.addr ? ["AF_INET", 8765, "localhost", "127.0.0.1"] BasicSocket.do_not_reverse_lookup = true u.addr ? ["AF_INET", 8765, "127.0.0.1", "127.0.0.1"] -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407