2016-08-31 14:03 GMT+03:00 Rémy Maucherat <r...@apache.org>:
>
> 2016-08-31 12:49 GMT+02:00 <violet...@apache.org>:
>
> > Author: violetagg
> > Date: Wed Aug 31 10:49:10 2016
> > New Revision: 1758580
> >
> > URL: http://svn.apache.org/viewvc?rev=1758580&view=rev
> > Log:
> > When AprEndpoint.write(boolean, ByteBuffer) is invoked with a non direct
> > ByteBuffer then copy that ByteBuffer to the socket write buffer before
> > transferring the data to the socket.
> >
> > Ah ok, I forgot that. Well, ultimately, it's the same when using OpenSSL
> as well (the engine will do the wrapping for you). IMO it's unrealistic to
> write directly application layer byte buffers in all cases. If the socket
> buffer is direct, it should be copied there first IMO. The direct flag is
> probably the best hint of the right decision.

Do you mean the APR case or also NIO and NIO2? With the new API
CoyoteOutputStream.write(ByteBuffer) the application layer may provide
direct ByteBuffers so why should we copy them to the socket write buffer
and not use them directly?



>
> Rémy

Reply via email to