I have tried this way :
out.println(" Hello World \n");
Unfortunately, It doesn't work well, the test result is:
2006-07-23 21:58:45 INFO TCPClientHandler:25 -
----------------------------------
2006-07-23 21:58:45 INFO TCPClientHandler:24 - Hello World
2006-07-23 21:58:45 INFO TCPClientHandler:25 -
----------------------------------
2006-07-23 21:58:45 INFO TCPClientHandler:24 - Hello World
2006-07-23 21:58:45 INFO TCPClientHandler:25 -
----------------------------------
2006-07-23 21:58:45 INFO TCPClientHandler:24 - Hello World
2006-07-23 21:58:45 INFO TCPClientHandler:25 -
----------------------------------
2006-07-23 21:58:45 INFO TCPClientHandler:24 - Hello World
Hello World
Hello World
Hello World
2006-07-23 21:58:45 INFO TCPClientHandler:25 -
----------------------------------
......
it seems not very regular.
When I invoke the flush method, I hope the server can read the data
immediately, but it seems the server don't read the data in time.
hpq852
2006-07-23
发件人: Emmanuel Lecharny
发送时间: 2006-07-23 21:55:51
收件人: [email protected]
抄送:
主题: Re: About Mina Question, Could you help me ?
hpq852 a écrit :
> I'm very sorry , yesterday I have sent the same question, but
> when I
> havn't joined the mailing list, so I didn't receive your response.
Np at all. It was just in case, I sent you back John answer.
Have you tried :
out.println(" Hello World \n");
(now, the '\n' is in the String... )
> follow your reply I have edit the code as out.println(" Hello
> World
> "); but it also can't work , when I use NIO client , I get
> the same
> result as my last mail . The attachment is the source code ,
> you can
> try it . Test.java is just a socket way and TestClient is a NIO
> way
> with Mina. Thank you very much.
> ------------------------------------------------------------------------
> hpq852
> 2006-07-23
> ------------------------------------------------------------------------
> *发件人:* Emmanuel Lecharny
> *发送时间:* 2006-07-23 21:12:16
> *收件人:* [email protected]
> *抄送:*
> *主题:* Re: About Mina Question, Could you help me ?
> hpq852 a �crit :
> >Hello, I'm using Mina for a TCP Server, but I suffer from a
> question
> which I can't resolve it and I beg your help. Thank you very
> much and
> the question is as following :
> >
> >
> <Snip/ >
> Hi,
> I don't know if this is an automatic second mail, or if you
> resent it
> accidentaly. However, I think that John Preston already sent you an
> answer :
> "Shouldn't you use out.println(" Hello World ");
> John "
> Could you reply the list to tell us if this was a correct
> response? I'm
> sure John will appreciate :)
> If it does not help, we will find another way to go.
> Emmanuel