UDP - NotYetConnectedException

fps fred.soulier.ml at gmail.com
Tue Jan 12 05:30:37 EST 2010




Trustin Lee wrote:
> 
>  
>> Why do you I get this NotYetConnectedException when replying to a client
>> that has just sent a message.?
> 
> It's because your server side Netty UDP channel is not connected, but
> just bound.  As stated in the Javadoc of Channel.write(Object), you
> should use Channel.write(Object, SocketAddress), if you are writing to
> an unconnected channel.
> 
> HTH,
> Trustin
> 

Hi Trustin
Yep this is what I was using. I do read the javadocs sometimes ;) But it was
not working.
The only way I manage to get it working and several hundred thousands of
messages sent back and forth is by executing:

channel.connect(event.getRemoteAddress());

in a messageReceived(...) method upon receiving the 1st message from the
client.

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


More information about the netty-users mailing list