Cross-platform RPC isn't an easy thing to pull off. RPC is not standards based, and different platforms handle things in different ways that make them directly incompatible.
That is, unless you put libraries between the client and server sides that handle the translation and communication for you.
You might want to look at
gRPC[
^]. It's a set of libraries that should make it much easier to do cross-platform RPC.
No, I've never used it, so don't ask me for examples.