UDP - NotYetConnectedException

fps fred.soulier.ml at gmail.com
Fri Jan 15 11:09:10 EST 2010




fps wrote:
> 
> I was using
>    e.getChannel().write(mymessage, e.getRemoteAddress()); 
> (where e is a MessageEvent ) and that didn't seem to work...
> 
> I've now added quite a bit of code since using Channel.write(Object,
> SocketAddress) so I need to ensure I still have the problem if I revert
> the code and then package something to you that shows the problem.
> That could take a little while but I'll try.
> 
> Fred
> 

Ok because I'm trying to use as much of my TCP code path for UDP I had a
couple of places not specifying the remote address (not needed for TCP since
by default the channel is connected) so I'm now using:
   channel.write(message, remoteAddress)
   Channels.write(context, future, buffer, remoteAddress)
everywhere. I'm taking no chances here...

The remote address for UDP message is saved in a ChannelContextHandler from
a ReplayingDecoder handler that implements LifeCycleAwareChannelHandler
(beforeXXX, afterXXX).

One pbm sorted out with UDP another truck load to deal with :)

Fred

-- 
View this message in context: http://n2.nabble.com/UDP-NotYetConnectedException-tp4273120p4399545.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list