Reputation: 1250
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.
Upvotes: 5
Views: 2753
Reputation: 1250
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.
Upvotes: 7