-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDPReceiver Exception on WinDesktop #55
Comments
Howdy, Interesting to see because in 'theory' UDP is stateless and connectionless! Can you share the link to resources that gave you that solution? If I understand better what it is doing I can decide how to include it. Thanks! 👍 |
http://stackoverflow.com/questions/7201862/an-existing-connection-was-forcibly-closed-by-the-remote-host |
I've implemented the solution you researched, so this will be enabled in the next release. Pretty crazy error! Thanks again! 👍 |
when I started UDPReceiver,and remote close udp port,then I get an Exception
An existing connection was forcibly closed by the remote host
sadly,I can`t catch this exception at anywhere,and if it shows that the Receiver will done,
but i need the Receiver alive,
to fix it I searched at google,it says
var udpClient = new UdpClient();
uint IOC_IN = 0x80000000;
uint IOC_VENDOR = 0x18000000;
uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;
udpClient.Client.IOControl((int)SIO_UDP_CONNRESET, new byte[] { Convert.ToByte(false) }, null);
So,I changed the source code and re-compile it,
Problem solved
At UdpSocketReveiver.cs
public Task StartListeningAsync(int port = 0, ICommsInterface listenOn = null)
{
if (listenOn != null && !listenOn.IsUsable)
throw new InvalidOperationException("Cannot listen on an unusable interface. Check the IsUsable property before attemping to bind.");
The text was updated successfully, but these errors were encountered: