You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2006/06/23 07:25:17 UTC
Re: Could you help me?
On 6/23/06, 侯培钦 <ho...@kingdee.com> wrote:
>
> Hi trustin, I'm using the MINA Framework, it's so great that it have saved so much time, Thank you first. Then I have a question about it as following and I beg your help.
>
>
Hi!
You'd better send your questions on MINA to mina-dev@directory.apache.org.
There're many people sitting there waiting for questions and ideas on MINA.
You'll get faster answer there.
In server side , I have a Handler, for example EchoProtocolHandler,
in method dataRead, I want to write a String to the channel, so I do
that like this:
>
>
> String str = "Hello";
> ByteBuffer wb = ByteBuffer.allocate( str.length() );
> wb.put(str.getBytes());
> wb.flip();
> session.write(wb, null);
>
>
> if like this, the client can't get the String "Hello", it was only blocked by
> in.readLine
> () method. I don't know why this happened. Could you help me for this question ? the Mina version is
> 0.8 .Thank you very much !
>
It seems like you forgot to add a newline character:
String str = "Hello\n";
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6