You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Simon Trudeau <st...@bluetreewireless.com> on 2008/04/09 20:06:01 UTC

Difference between IoFilter.filterWrite and IoFilter.MessageSent

Could any of you explain to me, for an IoFilter, the difference between
filterWrite() and messageSend()? I tend to mix them up and assume they
almost do the same thing.
 
Thanks,
 
Simon 
 

Re: Difference between IoFilter.filterWrite and IoFilter.MessageSent

Posted by Niklas Therning <ni...@trillian.se>.
Simon Trudeau skrev:
> Could any of you explain to me, for an IoFilter, the difference between
> filterWrite() and messageSend()? I tend to mix them up and assume they
> almost do the same thing.
>  
> Thanks,
>  
> Simon 
>  
>
>   

filterWrite() is called when session.write() is called. The IoFilter 
will have the opportunity to intercept the data before it is being 
written on the socket. The messageSent() callback is called after the 
data has been written to the socket. It directly corresponds to 
IoHandler.messageSent().

HTH

/Niklas