mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: How does session.isIdle() work in Mina?
Date Wed, 25 Oct 2006 04:48:14 GMT
On 10/25/06, Paul Chen <chenpaul@gmail.com> wrote:
>
> Sure, I will make it a Junit for it.
>
> BTW, is there any way to guarantee the data is written through the
> socket already before calling a session.close()? I got this problem
> only when writing large amount of data and a premature session.close()
> truncates the data on the receiving end.


IoSession.write() returns WriteFuture.  Calling WriteFuture.join() will make
sure that the message you requested is written out to the kernel buffer.
Otherwise, you can use messageSent event.

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message