-2

I have developed a Windows Phone application that uses camera to take pictures every second. Now I want to send these images to my Windows desktop application.

Besides images, I'm planing to send GPS data and other sensors' data to my Windows desktop application in the future.

I believe I can use System.Net.Sockets.Socket, but what I get from Socket is byte[], I don't know which part of the array is an image and which part is the next image. I need special coding.

Are there object-oriented ways to send data? Does .net remoting and WCF work on WP? What's your suggestion?

The target Windows Phone OS version can be 8 or 8.1.

Gqqnbig
  • 5,845
  • 10
  • 45
  • 86
  • HTTP exists for precisly this sort of application. Why make life difficult? What's your problem with HTTP? –  Feb 11 '15 at 00:52

1 Answers1

1

Don't reinvent the wheel. Opening a socket in this case is just about the same as starting a self-hosted http server, except with the http server all your problems are solved.

While with sockets, you have a lot of protocol and headaches to solve, with the HttpServer you got a ton of proven and tested code at your back, helping you solve your problem faster, plus everyone knows Http, so it's also easier to understand and maintain.

One way could be to roll up a Self-hosted Web API

André Snede
  • 9,899
  • 7
  • 43
  • 67
  • OK, I can work with HTTP server. In the Windows desktop application, what classes do I use to build a http server? – Gqqnbig Feb 11 '15 at 00:55
  • @LoveRight This information is quite easy to find, I'm surprised that your search did not come up with any results. You DID search, right? – Andrew Savinykh Feb 11 '15 at 01:03
  • If System.Web.Http.HttpServer is the right one to use, why did [other people](http://www.codeproject.com/Articles/137979/Simple-HTTP-Server-in-C) create their own? – Gqqnbig Feb 11 '15 at 01:06