Well. Where to begin?
You send messages to DF and you get messages back (when it doesn't crash ). It's a network protocol. I don't want it to be bogged down with anything that implements any kind of RPC spec or conforms to anything with more than a few A4 pages worth of documentation required. And honestly, I'd much rather have just registered event handlers that can process and respond to *versioned* messages instead of actual 'procedure calls'. So this stuff may change when I actually start looking at it.
There's no part of this protocol that would prevent you from using it from any language with:
- Basic protobuf implementation. It's hard to find a language with no protobuf suport.
- TCP sockets.
Take a look at this for inspiration:
https://github.com/wjrogers/HeavyDuck.DF.DwarfDuck
I'm not sure how complete it is, but it's in C#, which should be reasonably close to Java (the DFHack protocol part is relevant).
I'm sorry, I must not have set out my question properly
Using TCP sockets in Java is easy.
And using protobufs objects in any language is easy.
These things I know
Sending a
C struct as part of a handshake
from Java to a procedure running in another language is not easy or trivial. (I might wager that's a reason libraries like protobufs exist.)
Sending a
C stream object to a remote procedure call from Java is not trivial, either.
(The underlines are what I was concerned about. It seems odd to use protobufs if we'll have to delve into JNI to deal with the handshake and all the function calls anyway, from my side of things.)
Anyway I just wanted to clarify what I meant to ask--I don't require remedial help understanding sockets or protobufs.
I suppose the answer is clear either way. For me, unless I find time to master JNI, my application won't be bothering with this. (It would have been nice, but it's not a big deal in any way.) Thanks for your guidance