Netty Demos is a Java example collection that accompanies the Chinese Netty 4.x User Guide and a related practical book. It lets readers compare standard blocking I/O, NIO, AIO, and Netty implementations of similar network programs. The repository includes echo, discard, time, TCP, UDP, HTTP, HTTP/2, and WebSocket examples. Additional samples explain ByteBuffer, ByteBuf usage modes, thread pools, the Reactor pattern, heartbeat handling, and custom codecs. Serialization demonstrations cover Java objects and JSON through Jackson. Security examples include SSL/TLS mutual authentication, while monitoring modules show a lightweight service and interface. The project uses Netty 4.1.52, Jackson 2.10.1, and JUnit 5.5.2.
Features
- Blocking I/O, NIO, AIO, and Netty comparisons
- TCP, UDP, HTTP, HTTP/2, and WebSocket examples
- ByteBuffer and ByteBuf demonstrations
- Custom encoders and decoders
- Heartbeat, serialization, and SSL/TLS samples
- Lightweight monitoring modules