Background Sockets

MrGregorjo

New member
May 14, 2014
2
0
0
Visit site
I'm using sockets in my application.
And I just noticed that background sockets don't work any more on Windows 10 (desktop devices):eck:.

Does anybody else experience same issue?

I tested on mobile phones and emulators and It works as expected but on desktop I receive some gibberish data.
 

MrGregorjo

New member
May 14, 2014
2
0
0
Visit site
Found the solution
instead of using
await socket.ConnectAsync(new Windows.Networking.HostName(uri.Host), uri.Port.ToString(), SocketProtectionLevel.Tls12);
use
await socket.ConnectAsync(new Windows.Networking.HostName(uri.Host), uri.Port.ToString(), SocketProtectionLevel.PlainSocket);
await streamSocket.UpgradeToSslAsync(Windows.Networking.Sockets.SocketProtectionLevel.Tls12, hostName);
 

Members online

Forum statistics

Threads
326,674
Messages
2,248,739
Members
428,538
Latest member
hi29gh