A Java library for efficient TCP/UDP client-server network communication using NIO and Kryo serialization.
KryoNet is a Java library designed for efficient TCP and UDP client/server network communication. It uses NIO for performance and integrates with the Kryo serialization library to automatically handle object graph transfer across the network. It solves the problem of building networked applications with a clean, simple API while maintaining high efficiency.
Java developers building client/server applications, particularly in game development or scenarios requiring efficient network communication, including desktop and Android environments.
Developers choose KryoNet for its elegant and simple API that abstracts away the complexities of NIO networking and serialization. Its tight integration with Kryo for efficient object transfer and support for features like RMI and LAN discovery make it a robust alternative to lower-level or more complicated networking libraries.
TCP/UDP client/server library for Java, based on Kryo
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Java NIO for high-throughput TCP and UDP communication, ideal for performance-critical applications like games, as highlighted in the README's focus on efficiency.
Automatically serializes object graphs with the Kryo library, supporting optional compression and reducing boilerplate code, making network transfer straightforward.
Provides clean abstractions like Server and Client classes with listener-based event handling, simplifying common networking tasks without low-level complexity.
Includes UDP broadcasting for automatic server discovery on local networks, easing setup for multiplayer or local applications without manual configuration.
Requires classes to be registered in the exact same order on client and server, which can lead to subtle bugs and limits flexibility for dynamic or evolving codebases.
Lacks built-in reliability or flow control for UDP, as admitted in the README, forcing developers to implement these features themselves for robust communication.
The manual update calls or dedicated threading model can cause deadlocks if not carefully managed, especially when blocking on network operations in the update thread.
Beyond basic examples, advanced topics like large object handling or RMI customization are briefly covered, requiring developers to rely on source code or community support.