Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way for C# app to communicate unix c++ app

Tags:

c#

unix

interop

the ways I can think of

  1. Web service or soap
  2. Socket
  3. Database table
  4. shared file

Any concise example you know of for webservice?

like image 355
Southsouth Avatar asked Sep 12 '09 02:09

Southsouth


People also ask

What is the best way to learn C Quora?

step 1:Understand the problem by reading several times until you understand. step 2: Think logic of the problem. step 3: Put a pen on paper and write algorithm for that problem by applying your logic. step 4:Then convert the algorithm in C code.

Is C tough to learn?

C is more difficult to learn than JavaScript, but it's a valuable skill to have because most programming languages are actually implemented in C. This is because C is a “machine-level” language. So learning it will teach you how a computer works and will actually make learning new languages in the future easier.

Is C easy for beginners?

Which programming language is easy to learn? C and C++ are both somewhat difficult to learn to program well. However, in many respects, they share many similarities with many other popular languages. In that sense they're just as easy (or as difficult) to learn, at first, as anything other programming language.


1 Answers

Web services or soap would be fairly easy, however, if the C++ application isn't a web server naturally (or the C# application), it may be easier to just use socket programming directly.

Sockets are fairly easy to use from both C# and C++. They give you complete control over the type of date transmitted, at the cost of potentially a little more work in the handling.

The biggest issues to watch for are probably endianness of binary data, and encoding of text data, if you use sockets directly. Otherwise, it's very easy.

like image 64
Reed Copsey Avatar answered Sep 17 '22 02:09

Reed Copsey