All TCP Server implementations with Netty 4.0 I have found use a ServerBootstrap instance.
The biggest and only difference between a server and a client in Netty is that different Bootstrap and Channel implementations are used. Please take a look at the following code:
netty docu talking about a TCP Client.
But for UDP this quote seems irrelevant?! I found examples for UDP Servers that use just Bootstrap like: 1, 2, 3
I am pretty confused by that, so my two questions are:
For Netty 3.x there was the ConnectionlessBootstrap shown here but for 4.0 I couldn't find something similar.
From what I found out: Bootstrap is the correct entry point for UDP Servers in Netty 4.x
And there is no need for NioServerDatagramChannel, because UDP servers open one channel for all clients.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With