Muhammad Ichsan a écrit :
On Wed, Feb 3, 2010 at 8:39 PM, Emmanuel LŽcharny <[email protected]> wrote:
Muhammad Ichsan a écrit :
Just move the code outside of this event, it will work perfectly. Something
like :

...
      ConnectFuture cf = trying.createClient().connect(address);
            cf.awaitUninterruptibly();
            // Send many messages
      for (int i = 0; i < 20; i++) {

Great! it works. Thanks.

But, I wonder the purpose of session in sessionOpened.
You may add some logic when the session is opened.

Also, what
about if the server sends the messages first? How can I get the
session?
You can't. The server won't create a session on a client, or it will be called 'client', not server !

Reply via email to