0

I googled now a few days and didn't find a good solution for me (maybe I am too bad...).

I have an C# application which have data what the iphone app wants.

So I am logging in on my iPhone app and the C# app should send data.

So I need a central server who handles the requests. But this is my problem I dont find a good solution.

If it would be in a local network I would do this with sockets. But I want to do this over the internet.

I read about php socket server. But if I have a server with a static ip, can I run a self written C# socket sever on a vm?

Thanks for help!

johnbraum
  • 276
  • 4
  • 18
  • Is the iPhone app an app that you created? Or are you trying to integrate with an existing iPhone app? – gfish3000 Apr 24 '14 at 16:30
  • I programmed both. Or I will programm. :) – johnbraum Apr 24 '14 at 16:32
  • This can be done. Create your C# Socket server application and host it on a cloud services such as Amazon EC2. Then have the iPhone Socket clients connect to your Amazon EC2 server. Does this answer your question? – Mausimo Apr 24 '14 at 16:43
  • @errorcode, you could absolutely do that. But why not consider a JSON REST service with C# to handle the data for you and just communicate using JSON strings? It's a light way way to communicate across tech stacks [and Objective C can definitely parse JSON](http://stackoverflow.com/questions/5547311/how-do-i-parse-json-with-objective-c). – gfish3000 Apr 24 '14 at 16:45
  • @Mausimo, yes this answered my question. – johnbraum Apr 24 '14 at 16:49
  • @gfish3000, is it possible with a restful service to send data to a specific client? One point is that the c# app only should send data when im logged in in my iphone app.. – johnbraum Apr 24 '14 at 16:55
  • @errorcode, in this scenario, the iPhone app would request data from the C# service so if you're logged in and doing things, you're issuing requests to fetch or modify data. If you're not, then no requests are being sent. – gfish3000 Apr 24 '14 at 17:01

1 Answers1

0

You don't say how much data you want to transfer. If it's not that much, you might consider a message queue. You can set up a free account at http://www.iron.io/mq to test with. Their free account is pretty generous, so depending on your needs, it might work as a permanent solution as well.

Terry Lewis
  • 397
  • 2
  • 8
  • Just a few infos like fan speed, temperature. The amount of clients is at the beginning small but can grow very fast. I will try your suggestion! – johnbraum Apr 24 '14 at 16:52