Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin and c++ code

Currently I`m exploring how to write mobile apps for Android using Xamarin and C#. Also I have some c++ libraries(and source code for them) that should be used in application. These libraries are responsible for communication via internet(just to say).

So it is possible to use this c++ code in xamarin.android project? Or it should be rewritten in c# to be used?

like image 839
steavy Avatar asked Sep 17 '13 12:09

steavy


1 Answers

Im not sure with networking but most C++ code can be used 100% in Xamarin.

If it works, you can't be sure if it works correctly in every situation on IOS. We had the same problem with using UDP Sockets for VOIP(C#). Most of the time it will work, but in case of VOIP you need to use iOS sockets so you can set them to a special mode so they won't be closed when the app gets paused.

So it depends on what you want to do and how the C++ code is written. Im not sure if you can use normal unix sockets when using C++ on iOS but that should be the only problem when using it.

Just checked: Does Mac/IOS use the same sys/socket.h as the Linux kernel?

I think, if your library uses BSD sockets everything should be fine.

like image 190
Michiluki Avatar answered Sep 18 '22 15:09

Michiluki