经验分享 · 2023年9月17日

Netty TCPServer/UDPServer or TCPClient/UDPClient demo example

Here is a complete open source demo on GITHUB, https://github.com/narkhedesam/Netty-Simple-UDP-TCP-server-client

Or if you just want simple code

UdpServer.java

 

UdpServerHandler.java

UdpClient.java

ClientHandler.java