when I use linux's "sendto(....)" to send some udp packet, I got "invalid argument" error from system. After some check, I found that I try to send a udp packet via a v6 socekt to a ipv4 destination , I'm开发者_开发知识库 not sure whether it is the reason why "invalid argument" comes from system, so want to raise my question here.
Yes, a PF_INET6
socket can send to IPv4 destination addresses with sendto()
- as long as you haven't bound it to an IPv6 local address, anyway.
精彩评论