Is there any support for TCP/IP Sockets in Windows Phone 7? I'm not having any luck finding it so far.
I want to connect to a port on a server and issue commands/receive responses
问题:
回答1:
It was added in mango version. http://msdn.microsoft.com/en-us/library/system.net.sockets.socket(v=VS.96).aspx
回答2:
from the WM Phone 7 Dev FAQ:
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/2892a6f0-ab26-48d6-b63c-e38f62eda3b3
Can I use Sockets for peer to peer communication?
Windows Phone 7 Series currently does not expose the Socket classes. While the version of Silverlight on the phone follows closely the feature list for Silverlight 3 on the desktop, it is a subset of those features and will not contain all classes. (It also holds a superset of classes not available in Silverlight 3.)
回答3:
According to microsoft announcment, sockets will be available in next "mango" update for late 2011. Dev tools to ship May 2011. "...The integration extends deeper into the operating system via sockets..."
回答4:
While sockets are not exposed in Windows Phone 7, the better alternative would be to use WCF.