How to support both IPv4 and IPv6 connections
问题 I'm currently working on a UDP socket application and I need to build in support so that IPV4 and IPV6 connections can send packets to a server. I was hoping that someone could help me out and point me in the right direction; the majority of the documentation that I found was not complete. It'd also be helpful if you could point out any differences between Winsock and BSD sockets. Thanks in advance! 回答1: The best approach is to create an IPv6 server socket that can also accept IPv4