Dan Tran
Dan Tran

Reputation: 139

No UDP pipeline in netty 4

Hi I am using netty 4 example (qotm) to create a UDP server where 'Bootstrap' is used. This class does not allow pipeline the handlers. Am I missing something?

Upvotes: 2

Views: 1926

Answers (1)

trustin
trustin

Reputation: 12351

You can specify a ChannelInitializer for Bootstrap.handler(..), just like other examples with multiple handlers in a pipeline.

Please keep in mind that UDP is connectionless and thus a UDP channel handles all packets from multiple remote hosts using a single pipeline. To set up different pipeline for different protocols, you must create multiple UDP channels and bind them on different ports, just like you did in Netty 3.

Upvotes: 5

Related Questions