2
votes

I there a way in Netty (old and new api) to listen to incoming TCP connection and receive UDP packets on the same port?

I am running a single instance of netty server that is listening on port 80. Depending on either a TCP or UDP message the server needs to switch to appropriate handlers.

2

2 Answers

0
votes

I guess you already have a ServerBootstrap set up with a specific pipe line factory. All you have to do is create a ConnectionlessBoostrap with a DatagramChannelFactory, set it up with a handler pipe line of your needs and bind to the same port.

-4
votes

Yes, you can. Let me know if you can't.