Adrian Ramzes
Adrian Ramzes

Reputation: 51

How to send data form Windows Phone 8.1 to PC using TCP or UDP?

I'm trying to send data between Windows Phone 8.1 app and my PC. How to do this? Is there any other way to connect with my PC? I found this.

But I can't add System.Net.Sockets to my project. Any working example will be a huge help.

Upvotes: 2

Views: 1090

Answers (1)

Rob Caplan - MSFT
Rob Caplan - MSFT

Reputation: 21899

System.Net.Sockets and the docs you linked are for Windows Phone Silverlight apps. For a Windows Phone Runtime app you'll use Windows.Networking.Sockets.StreamSocket (TCP) or Windows.Networking.Sockets.DatagramSocket (UDP).

See How to connect with a stream socket and How to connect with a datagram socket on MSDN for details.

Upvotes: 1

Related Questions