Based on https://github.com/csm/java-enet-wrapper/