users@grizzly.java.net

Clarification for UDP needed

From: Mkrtchyan, Tigran <tigran.mkrtchyan_at_desy.de>
Date: Mon, 8 Feb 2016 13:00:39 +0100 (CET)

Hi Folks,

I have a following code:

FilterChainContext ctx = ...;
Connection<InetSocketAddress> connection = ctx.getConnection();

In case of UDP on the server side I get not connected exception if I use:

connection.write(connection.getPeerAddress(), msg);

but works if I use like this:

connection.write((InetSocketAddress)ctx.getAddress(), msg);

If it expected behavior?

Thanks in advance,
   Tigran.