invesdwin / invesdwin-context-integration

invesdwin-context modules that provide integration features
GNU Lesser General Public License v3.0
1 stars 0 forks source link

use IByteBufferProvider instead of IByteBuffer for ISynchronousReaders #31

Closed subes closed 1 year ago

subes commented 1 year ago

This allows readers to provide their own buffers for reading that allow to skip some copy operations. Similar to how this works for ISynchronousWriters.

I think in an earlier version the TlsHandshaker there was a spot where this would have helped. Currently there should be a spot in TlsSynchronousChannel where this would help.

subes commented 1 year ago

done, though after checking it is rarely useful (it often adds another copy). So keeping asBuffer() instead of getBuffer() in most cases. Though some readers now support both modes similar to the writer providers.