> System.Net.Sockets.dll!System.Net.Sockets.Socket.EndReceiveFrom(System.IAsyncResult asyncResult, ref System.Net.EndPoint endPoint) Unknown
System.Net.Sockets.dll!System.Net.Sockets.SocketTaskExtensions.ReceiveFromAsync.AnonymousMethod__8_1(System.IAsyncResult asyncResult) Unknown
System.Private.CoreLib.ni.dll!System.Threading.Tasks.TaskFactory<System.Net.Sockets.SocketReceiveFromResult>.FromAsyncCoreLogic(System.IAsyncResult iar, System.Func<System.IAsyncResult, System.Net.Sockets.SocketReceiveFromResult> endFunction, System.Action<System.IAsyncResult> endAction, System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> promise, bool requiresSynchronization) Unknown
System.Private.CoreLib.ni.dll!System.Threading.Tasks.TaskFactory<System.Net.Sockets.SocketReceiveFromResult>.FromAsyncImpl.AnonymousMethod__0(System.IAsyncResult iar) Unknown
System.Net.Sockets.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Unknown
System.Net.Sockets.dll!System.Net.ContextAwareResult.CompleteCallback() Unknown
System.Net.Sockets.dll!System.Net.ContextAwareResult.Complete.AnonymousMethod__15_0(object s) Unknown
System.Private.CoreLib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
System.Net.Sockets.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Unknown
System.Net.Sockets.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Unknown
System.Net.Sockets.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) Unknown
System.Threading.Overlapped.dll!System.Threading.Win32ThreadPoolNativeOverlapped.OnExecutionContextCallback(object state) Unknown
System.Private.CoreLib.ni.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
System.Threading.Overlapped.dll!System.Threading.Win32ThreadPoolNativeOverlapped.CompleteWithCallback(uint errorCode, uint bytesWritten, System.Threading.Win32ThreadPoolNativeOverlapped* overlapped) Unknown
System.Threading.Overlapped.dll!System.Threading.ThreadPoolBoundHandle.OnNativeIOCompleted(System.IntPtr instance, System.IntPtr context, System.IntPtr overlappedPtr, uint ioResult, System.UIntPtr numberOfBytesTransferred, System.IntPtr ioPtr) Unknown
I'm using RSSDP for Windows 10 UWP app.
foreach (var host in confirmedHosts)
{
var deviceLocator =
new SsdpDeviceLocator(new SsdpCommunicationsServer(new SocketFactory(host.CanonicalName)))
{
NotificationFilter = "urn:schemas-upnp-org:device:MediaServer:1"
};
deviceLocator.DeviceAvailable += DeviceLocator_DeviceAvailable;
deviceLocator.StartListeningForNotifications();
deviceLocators.Add(deviceLocator);
}
try
{
foreach (var dev in deviceLocators)
{
await dev.SearchAsync();
}
}
catch (Exception e)
{
Log.Debug(e);
}
private async void DeviceLocator_DeviceAvailable(object sender, DeviceAvailableEventArgs arg)
{
try
{
....
}
catch (Exception e)
{
Debug.WriteLine(e);
Log.Error(e);
}
}
I have my own UDP receiver code using DatagramSocket and it has no such problem.