tags:

views:

162

answers:

2

Hi,

I want to create an application in Android which communicates with a server application (written in C#, doesn't matter what version of .NET) on the PC via TCP/IP. What would be the best approace here?

I was thinking about some kind of RPC like SOAP or XML-RPC. But I want to keep the server application as light and simple as possible. And I think in C# you rely on a Webserver to set up an RPC server.

Or maybe is it better to communicate directly via the TcpListener?

A: 

I had pretty good luck using TCP/IP and UDP with android and windows (Java & C# respectively). I used a more brutal approach then the TCPListener for the C# but pretty similar at the high level. I would recommend giving it a shot and seeing the outcome, chances are it's going to be fairly more lightweight in terms of processing and bandwidth then an XML approach.

Quintin Robinson
It might, indeed be better for now, to just use a higher level.
Sander
A: 

What kind of data will your program be sending over the network? If it's something simple why not use a high level protocol like http? I'm more of a java person, but I know that there must be a .net equivalent to running a lean http server to connect to.

darren
For now it will be rather simple data. However, in the future it might need to transfer more complex data.
Sander