[#7872] Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...>

All, I needed a nonblocking socket connect for my asynchronous-event

18 messages 2006/05/14
[#7873] Re: Nonblocking socket-connect — Tanaka Akira <akr@...17n.org> 2006/05/14

In article <3a94cf510605140559l7baa0205le341dac4f47d424b@mail.gmail.com>,

[#7874] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

How about introducing the method Socket#set_nonblocking, or alternatively

[#7875] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

[#7876] Re: Nonblocking socket-connect — "Francis Cianfrocca" <garbagecat10@...> 2006/05/15

Well, it's ok then. I'm comfortable adding in the nonblocking

[#7877] Re: Nonblocking socket-connect — Yukihiro Matsumoto <matz@...> 2006/05/15

Hi,

Re: reproducible bug in DRb on OSX

From: Sam Roberts <sroberts@...>
Date: 2006-05-17 17:27:08 UTC
List: ruby-core #7897
Quoting drbrain@segment7.net, on Wed, May 17, 2006 at 12:51:00PM +0900:
> On May 16, 2006, at 7:51 PM, cremes.devlist@mac.com wrote:
> 127.0.0.1 is not a valid IPv6 address.  This was a bug in your code  
> not handling IPv6 addresses when your OS uses them.
> 
> >Any hint as to how to fix this in a permanent fashion.
> 
> a) Make your DNS work for IPv4 and IPv6 and bind to both IPv6 and  
> IPv4 addresses on your machine for interoperability.
> b) Never use IPv6.

It might be useful if DRb could be told what IP versions to use with
localhost, so nice names like 'localhost' can be used with it, and we
can leave IPv6 configured for services where you want it.

Socket.gethostbyname("localhost") returns an IPv6 addr on OS X if IPv6
is enabled,  getaddrinfo() can be used instead to distinguish which
protocol is wanted:

 Socket.getaddrinfo('localhost', 0, Socket::AF_INET,  Socket::SOCK_STREAM)[0][3]
 Socket.getaddrinfo('localhost', 0, Socket::AF_INET6, Socket::SOCK_STREAM)[0][3]

Sam


In This Thread

Prev Next