You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Hieu Phan Thanh <hi...@Cybersoft-VN.com> on 2006/11/16 09:59:27 UTC

[mina] Traffic Control: session still received messages from the socket however i call IoSession.suspendRead()?

Hi, I have been applying Traffic Control to my software. I encountered
some problems. Would you please share experience with?

Why the session still receives message however I called
IoSession.suspendRead()?

Thanks & best regards,
Hieu Phan.




Re: [mina] Traffic Control: session still received messages from the socket however i call IoSession.suspendRead()?

Posted by Trustin Lee <tr...@gmail.com>.
On 11/16/06, Hieu Phan Thanh <hi...@cybersoft-vn.com> wrote:
>
> Hi, I have been applying Traffic Control to my software. I encountered
> some problems. Would you please share experience with?
>
> Why the session still receives message however I called
> IoSession.suspendRead()?


Even if you called suspendRead, the data which is read already before the
call will be forwarded to your handler.  There's also time difference
between your call and when read is suspended, so you can get a little bit of
data after your call.  To put simply, the call is asynchronous, so it
doesn't guarentee as precisely as you expected.

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