It alse can't work well, Now the client is :

    public void run()
    {
     for(int i=0; i<10; i++)
     {
      out.print(" Hello World \n");
      out.flush();
     }
    }

if I invode the flush method for 10 times, I also want to get the 
dataRead(IoSession session, ByteBuffer rb) mothed invoked for 10 times in the 
server side , but from the result it seems be invoked only 2 times , because 
only 2 '--------------------------' was be printed :

2006-07-23 23:06:18  INFO TCPClientHandler:24 -  Hello World 

2006-07-23 23:06:18  INFO TCPClientHandler:25 - 
----------------------------------
2006-07-23 23:06:18  INFO TCPClientHandler:24 -  Hello World 
 Hello World 
 Hello World 
 Hello World 
 Hello World 
 Hello World 
 Hello World 
 Hello World 
 Hello World 

2006-07-23 23:06:18  INFO TCPClientHandler:25 - 
----------------------------------


if the dataRead method was invoked 10 times , the result should be :

      Hello World 
  ----------------
      Hello World 
  ----------------
      Hello World 
  ----------------
      Hello World 
  ----------------
      Hello World 
  ----------------
      Hello World 
  ----------------
   ......

this's what I want to get. This question make me can't be in bed, I really hope 
your help, thank you.



hpq852
2006-07-23



发件人: Emmanuel Lecharny
发送时间: 2006-07-23 22:45:36
收件人: [email protected]
抄送: 
主题: Re: About Mina Question, Could you help me ?

hpq852  a  écrit  :

>I  have  tried  this  way  :
>
>out.println("    Hello    World    \n");
>    
>
I  have  made  a  mistake.  It's  not  out.println,  but  out.print.

In  the  result  you  put  in  the  message,  it  seems  that  some  new  lines 
 are
inserted  after  each  Hello  orld,  so  I  guess  this  is  the  intended  
result,
right?

Try  to  remove  the  loggers,  too.

Hope  it  helps.

Emmanuel

Reply via email to