The network library is compatible with C and Java
I want to develop an Android mini-game with multiplayer features. I have made a server framework in C++ using the eNet library and I want to use this framework to make servers.
So, is there a Java and C++ compatible networking library like eNet? I know jEnet exists (but Java-enet-wrapper (https://github.com/csm/java-enet-wrapper) is obsolete) and it’s not mature.
Solution
See https://github.com/julienr/libenet-android
In your case, ENet is preferable to UDT, which can be processor-intensive and game services at least want to have a lot of connections. The difference is that UDT implements congestion control and has higher CPU requirements. UDTs are great, but designed more for large, high-bandwidth transfers over long distances than the small, high-latency transactions needed in games.
Also note that mainstream congestion control algorithms are not suitable for small transactions. They work by monitoring the RTT of each packet in a transaction and/or monitoring the packet loss rate in a transaction, which makes no practical sense when there are only 1-2 packets per transaction on average. The additional requirements of the congestion control protocol will affect latency, even if the transmission remains small, congestion control itself is unlikely to participate.