Socket error 10052 on UDP socket

后端 未结 3 1397
我寻月下人不归
我寻月下人不归 2021-01-11 13:29

We have a .NET 2.0 desktop application which sends and receives network packets over UDP.

Several users have reported an occasional socket error 10052 which happens

3条回答
  •  忘掉有多难
    2021-01-11 14:13

    Be sure that TTL value is high enough, when sending UDP datagrams.

    If you are using UdpClient class. Then use the following before sending the datagram:

    myUdpClient.Ttl = 255;
    

    Note: 255 is the maximum value for TTL. There is some network problem if that value is not enough.

提交回复
热议问题