[ 
http://issues.apache.org/jira/browse/DIRMINA-229?page=comments#action_12429616 
] 
            
Niklas Therning commented on DIRMINA-229:
-----------------------------------------

I'm not sure I'd like to have a property for that since InputStreams are 
supposed to be blocking. However, one thing that I thought of while I applied 
Oleg's patch was that write() doesn't have to block if we implemented flush() 
properly. One way of doing that would be to remember the last WriteFuture and 
then join on that WriteFuture in flush(). close() should then of course call 
flush() before it closes the session. I think that this wouldn't break people's 
undertanding of how InputStreams work, yet be more efficient than the current 
solution. 

> IoSessionOutputStream write methods should not return before the I/O 
> operation is fully completed
> -------------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-229
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-229
>             Project: Directory MINA
>          Issue Type: Bug
>    Affects Versions: 0.9.4
>            Reporter: Oleg Kalnichevski
>         Assigned To: Niklas Therning
>             Fix For: 0.9.5
>
>         Attachments: mina-bio-stream.patch
>
>
> IoSessionOutputStream write methods return before the I/O operation is fully 
> completed, which causes issues in protocol handlers based on blocking 
> InputStream/OutputStream model. Is it a desired behaviour?
> Per discussion with Peter Royal on the HttpComponents mailing list I am 
> working on a simple HTTP server based on MINA and HttpComponents Core.  
> HttpCore does not work with the latest SVN snapshot of MINA without this 
> patch (attached)
> Oleg

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to