|
|
|
date: Fri, 14 Dec 2007 11:06:49 +0530,
group: microsoft.public.platformsdk.networking.ipv6
back
Re: Mixing IPv4 and IPv6 sockets
Technically speaking, this is not guaranteed to work, because in theory
those sockets could come from two separate Winsock providers.
However, in this case, you're pretty likely to find it working, because your
IPv4 and IPv6 stack are most likely going to be provided by Microsoft.
Back in the old days of Winsock, it wasn't uncommon to find that select()
failed if you passed it UDP and TCP sockets from the same provider! While
this isn't the case any more, it's worth noting that select() is not
guaranteed to provide the functionality you're looking for, so its behaviour
could be changed by Microsoft at any time, and you'd be left with no
recourse, because it's "not supported".
If your code is complex enough that you handle IPv6 and IPv4 sockets
together in it, you may find that you'll get better performance and more
functionality out of alternatives to blocking and select(). Consider
overlapped or asynchronous sockets, which don't have any limitation on
whether you use the same Winsock provider. For asynchronous sockets, look up
WSAAsyncSelect in the MSDN documentation; for overlapped sockets, try
looking at WSARecv.
Alun.
~~~~
"Farooque Khan" <farooque.khan[AT]gmail[DOT]com> wrote in message
news:ONMvR6hPIHA.4752@TK2MSFTNGP05.phx.gbl...
> Seems like I can.
>
> --
>
> -Farooque
>
> "Farooque Khan" <farooque.khan[AT]gmail[DOT]com> wrote in message
> news:%23yoaRNhPIHA.6060@TK2MSFTNGP05.phx.gbl...
>> Hi,
>>
>> Can I mix IPv4 and IPv6 sockets in a select() call? For example, can I
>> have one AF_INET family socket and one AF_INET6 family socket in one
>> single select() call?
>>
>> --
>>
>> -Farooque
>>
>>
>
>
date: Sat, 12 Jan 2008 09:25:09 -0800
author: Alun Jones lid
|
|