Hi, On Tue, Feb 20, 2018 at 8:35 PM, Pavel Rappo <pavel.ra...@oracle.com> wrote: > If by copies you mean allocating new buffers and feeling them with the same > contents, then you are right. No copies are made.
I mean that you call user code with a ByteBuffer produced from a slice() of an internal ByteBuffer. The CF mechanism must ensure that the content of the internal ByteBuffer is not changed (for example by clearing it and reading from the network) before all CFs associated with sliced ByteBuffers generated from the internal ByteBuffer are completed. > However there is a natural need for multiple passes over the buffers, both > being sent and received. These are unavoidable transformations performed by > SSL > and WebSocket masking. Sure. > As for the WHOLE message, there's no way an implementation can provide a > zero-copy > solution. Leaving SSL aside, I don't see why not ? Read from network, parse header bytes, slice the buffer, call the listener. Zero copy. Can you expand ? -- Simone Bordet --- Finally, no matter how good the architecture and design are, to deliver bug-free software with optimal performance and reliability, the implementation technique must be flawless. Victoria Livschitz