0

Am working on UDP server which have multiple handlers.

Look at my code how I bootstrap the channel.

return new Bootstrap().
                group(rtpNioEventLoopGroup()).
                channel(NioDatagramChannel.class).
                handler(saveToRepoHandler()).                
                handler(informPartyHandler()); 

Now my save-repo and inform-party need to be executed asynchronously. They have no dependency to each other.

Does netty execute them asynchronously ?

Isuru
  • 7,893
  • 8
  • 30
  • 38

1 Answers1

0

Calling handler(...) multiple times will just replace the previous set handler. You want to use a ChannelInitializer and add the ChannelHandlers there. Check our examples or the javadocs for details.

Norman Maurer
  • 23,104
  • 2
  • 33
  • 31