plugins - handling native to C# code?

Hello,

I have a .so file I need to use on my android game.
I have read http://unity3d.com/support/documentation/Manual/Plugins.html and it works fine when you invoke the native code with DLLimport.

The problem is that I also need to have the native code do callbacks into C# code, something the tutorial does not mention. How do you handle this the best way?

Looking at the ‘Calling C# / JavaScript back from native code’ paragraph, it seems Unity only supports native to C# messags on iOS devices.

My best bet is to open a socket on both sides to send text messages. This would reproduce what is supported on iOS devices but would make it usable on any platform.