2009/7/16 Tanaka Akira <akr / fsij.org>:
> In article <20090716185929.6EC1.C613B076 / garbagecollect.jp>,
> "U.Nakamura" <usa / garbagecollect.jp> writes:
>
>> Ruby's socket library expects that getsockname(2) always
>> returns local address information, but WinSock cannot return
>> any information from non-connected and non-binded sockets.
>>
>> akr, any suggestion?
>
> I'd like to investigate the socket family (address family)
> of a fd to create addrinfo object.
>
> Is there a way for that on WinSock?

You can use WSADuplicateSocket function to get WSAPROTOCOL_INFO structure.

Regards,

Park Heesob