Hello,
I have problem while using the UDPConnectionListener. If I StopListening() and want to StartListening() for the same IPEndPoint again, an unhandled exception occures. The exception says:
Additional information: A UDP connection already exists with info [UDP-D-U] 0.0.0.0:4001 -> 0.0.0.0:0
Init UDP Listener:
SendReceiveOptions optionsToUseForUDPInput = new SendReceiveOptions<NetworkCommsDotNet.DPSBase.NullSerializer>();
udpListener = new UDPConnectionListener(optionsToUseForUDPInput, ApplicationLayerProtocolStatus.Disabled, UDPOptions.None);
udpListener.AppendIncomingUnmanagedPacketHandler(handleIncomingUDPPackage);
Code for Button which Start Listener:
Connection.StartListening(udpListener, new System.Net.IPEndPoint(System.Net.IPAddress.Any, 4001));
Code for Button which Stops Listener:
Connection.StopListening(udpListener);
Until here, everything works fine. But if I click on the Start Button again, the exception mentioned above throws.
Funny fact: The following code works without problems (if you write the Start/Stop/Start in one button:
Connection.StartListening(udpListener, new System.Net.IPEndPoint(System.Net.IPAddress.Any, 4001));
Connection.StopListening(udpListener);
Connection.StartListening(udpListener, new System.Net.IPEndPoint(System.Net.IPAddress.Any, 4001));
Thanks for your help in advance.