Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Fri, 14 Dec 2007 11:06:49 +0530,    group: microsoft.public.platformsdk.networking.ipv6        back       


Mixing IPv4 and IPv6 sockets   
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: Fri, 14 Dec 2007 11:06:49 +0530   author:   Farooque Khan farooque.khan[AT]gmail[DOT]com

Re: Mixing IPv4 and IPv6 sockets   
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: Fri, 14 Dec 2007 12:27:22 +0530   author:   Farooque Khan farooque.khan[AT]gmail[DOT]com

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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us