mina:about sequence of code line
<pre><code>    connFuture.awaitUninterruptibly();//1
    connFuture.addListener(new IoFutureListener&lt;ConnectFuture&gt;(){//2

        @Override
        public void operationComplete(ConnectFuture future) {
            if(future.isConnected()){
                session = future.getSession();
                sendData();     
            }else
                System.out.println("fail to connect");
        }           
    });
</code></pre>

<p>sendData is a func sending 1 message per second.In this order(1,2), server would accept messages one by one.But reverse the order(2,1), server would accept messages once after all message sent.What makes diff ?</p>
