UDP woes...
fps
fred.soulier.ml at gmail.com
Fri Jan 15 12:00:05 EST 2010
Trustin Lee wrote:
>
> ChannelPipelineCoverage for documentation purposes only. In UDP, still
> a single handler instance will handle all incoming packets to the same
> port. Read the Javadoc of ChannelPipelineCoverage.
>
It doesn't tell me an awful lot... Ok UDP will have one channel handling all
clients so the pipeline is the same for all clients.
Unless I start prefixing all client messages with message type ids to
indicate which handler needs to process a given type of message I don't see
how I can handle multiple clients. Also as part of my TCP protocol the
pipeline gets dynamically changed upon messages being processed. For example
once the handshake has been completed for a channel, some handlers get
removed and some get added. With UDP I can't really reuse this mechanism
because everything comes on the same channel and I can't assume that we
don't need such and such handlers anymore.
Having the possibility to have a bootstrap UDP server that creates child
channels would go a long way to avoid having to implement some
demultiplexing hack.
Trustin Lee wrote:
>
> MessageEvent e;
> ((InetSocketAddress) e.getRemoteAddress()).getPort()?
>
Yes realised that after I posted... Doh!
Trustin Lee wrote:
>
> It's UDP - you should take care of ordering, reliability, connection
> management all by yourself.
>
I agree to disagree here ;)
Fred
--
View this message in context: http://n2.nabble.com/UDP-woes-tp4394311p4399856.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list