IPv6 support in StrongDC++ is now almost ready - IPv4/IPv6 connections to hubs work, connections between users work correctly too. But there are two possible implementations and each one has its advantages and disadvantages. Now I have to choose one of them:
a) hybrid dual-stack
+ just one IPv6 socket is created and it supports both IPv4 and IPv6 connections
+ very easy to implement and code is almost clean
- it's not supported on older OS's (e.g. WinXP doesn't support it)
- IPv4 addresses are in IPv4-mapped IPv6 format, so conversion must be done
b) independent dual-stack
+ works on all OS's with IPv6 support (including WinXP)
+ IPv4 addresses are in IPv4 format
- two sockets need to be created - one for IPv4 and one for IPv6 connections (increases resource usage)
- almost everything needs to be doubled (you need to listen on both sockets, do blocking wait on two sockets etc.)
- a more complicated for implementation than first method (you need to check for IP address version etc.)
StrongDC++ will use the first method. But what to do when hybrid dual-stack is not supported (e.g. WinXP)? Should I fallback to second method or completely disable IPv6 support in this case?
IPv6 support in StrongDC++ is now almost ready - IPv4/IPv6 connections to hubs work, connections between users work correctly too. But there are two possible implementations and each one has its advantages and disadvantages. Now I have to choose one of them:
a) hybrid dual-stack
+ just one IPv6 socket is created and it supports both IPv4 and IPv6 connections
+ very easy to implement and code is almost clean
- it's not supported on older OS's (e.g. WinXP doesn't support it)
- IPv4 addresses are in IPv4-mapped IPv6 format, so conversion must be done
b) independent dual-stack
+ works on all OS's with IPv6 support (including WinXP)
+ IPv4 addresses are in IPv4 format
- two sockets need to be created - one for IPv4 and one for IPv6 connections (increases resource usage)
- almost everything needs to be doubled (you need to listen on both sockets, do blocking wait on two sockets etc.)
- a more complicated for implementation than first method (you need to check for IP address version etc.)
StrongDC++ will use the first method. But what to do when hybrid dual-stack is not supported (e.g. WinXP)? Should I fallback to second method or completely disable IPv6 support in this case?