简体   繁体   中英

Using StreamSocket on Wpf and WinForms

As you know Microsoft just removed the whole System.Net.Sockets on .Net for Windows store apps and now you should use StreamSocketListener if you want TcpListener , StreamSocket for TcpClient , etc. At the first time it may look like you lost TcpClient and those stuff but to me StreamSocket is pretty enjoyable and I want to use it in my Windows Forms and WPF applications for regular desktop versions as well. and here is my question is it possible to use Windows.Networking.Sockets.StreamSocket and those stuff on WinForms and WPF (.Net 4.5 and not .Net for Windows store apps) because then I can write the same code for both of them. Besides StreamSocket is more handy.

From MSDN,

Minimum supported client - Windows 8 [Windows Store apps, desktop apps]

Minimum supported server - Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone - Windows Phone 8

So my guess is you can use it with anything as long as you are using .Net 4.5 and the app is running on those Operating systems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM