Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is any networking library like eNet compatible with Java and C++?

'm trying to find a way to communicate an Android game in Java with a C + + server, but I prefer to use a network library instead raw sockets.

I've found a java-enet, but I don't know if it's a mature project or compatible with eNet C version.

share|improve this question
Can't you just use eNet with C++ and some Java networking library on the Java side? How would that not be compatible network-wise? Or am I missing something here? – zxcdw Sep 14 '12 at 19:08
This is the problem. ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol). The primary feature it provides is optional reliable, in-order delivery of packets. So I've to implement the ENet protocol to be compatible. I'm going to try if java-enet are compatible with eNet 1.3.x protocol. I wish there was a bookstore like eNet functional in both languages. – fabregot Sep 14 '12 at 20:01
You really want to use eNet, don't you? Well, I didn't want to write an answer because it really doesn't answer your question directly, but it is possible to compile eNet as an Android module and use it inside any Java application through JNI. I have managed to successfully build the library and initialize it in a simple Android HelloWorld app. Pros: you are using essentially the same version of eNet both server- and client-side. Cons: the compiling to an Android compatible module requires some code acrobatics. More info here: – Vladimir Mitrovic Sep 15 '12 at 11:50
@VladimirMitrovic Post that as an answer. :) It might not directly answer the question but it does respond to fabregot's desire. – doppelgreener Sep 16 '12 at 11:29
@jonathan I can't, I don't have access to a computing device with a physical keyboard (exams time results in me going cold turkey on the internet stuff so I locked it away :)). When I'm done with school work in a couple of weeks, I'll try to implement a simple client app using jni wrapped enet module and if I succeed, I'll post the full steps and source code here, if it's allowed. – Vladimir Mitrovic Sep 16 '12 at 13:41
up vote 1 down vote accepted

There is ICE. It's cross platform network middleware, which is quite powerful. It has C++ and Java binds, also with android support IIRC.

share|improve this answer
Thanks Bartek. I'm going to take a look. Seems like a good option. – fabregot Oct 2 '12 at 8:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.