[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02986] Re: Socket.getnameinfo

From: matz@... (Yukihiro Matsumoto)
Date: 2000-05-25 15:14:03 UTC
List: ruby-talk #2986
In message "[ruby-talk:02979] Re: Socket.getnameinfo"
    on 00/05/25, Yukihiro Matsumoto <matz@netlab.co.jp> writes:

||So when I document the call, I should say that the only value allowed
||for the service parameter is nil?
|
|I'll take time to survey this stuff (and others).  So could you put it
|pending for a while?

According to RFC2553, getaddrinfo() should accept any socktype if
ai_socktype is zero.  But getaddrinfo() in glibc 2.1.3 or earlier
raise error if ai_socktype is set to zero.  It must be set to specific
socktype (e.g. SOCK_STREAM).  I think I can call this a bug in glibc.
I've heard IPv6 code would be improved dramatically in glibc 2.2, so I
hope this to be fixed too.

Workaround:

  (a) use getaddinfo/getnameinfo bundled with socket library.  invoke
      configure or extconf.rb with --enable-wide-getaddrinfo.

  (b) put the following code somewhere before invocation of
      getaddrinfo() in sock_s_getnameinfo().

	hints.ai_socktype = SOCK_STREAM;

							matz.

In This Thread