Function request: udp server with netty: create a channel for each remote address

ConnectionlessBootstrap creates one channel for binding. The same channel is used upstream for all incoming messages from all remote addresses and downstream for outgoing messages. Therefore, the same pipeline object is used.

ServerBootstrap creates a new channel for each remote address when it is connected and, therefore, a new pipeline is created.

It is advisable that ConnectionlessBootstrap create a new channel for each remote address. This will allow the use of "channel specific handlers" such as ChannelTrafficShapingHandler or OrderedMemoryAwareThreadPoolExecutor. This channel should be used for all incoming / outgoing messages to the same remote address.

You can also use channel.write () without a remote address, which will simplify porting tcp applications to udp.

Since we do not have a disconnect, the channel can be closed using ReadTimeoutHandler.

Currently, if the function of these handlers is needed, it must be redefined "outside the pipeline", where data is stored in the remote addresses of specific objects.

What do you think?

- Ron

+3
source share

All Articles