astitcher commented on PR #435: URL: https://github.com/apache/qpid-proton/pull/435#issuecomment-2445046125
There are 2 use cases for ```pn_buffer_t```: 1. As an intermediate buffer in the output logic chain. In this usage I'm pretty sure that we can stop automatically defragging the buffer and only do it on a specific request. In this world the ```pn_buffer_bytes``` API can obviously only return one contiguous segment of the buffer, but there can only be 2 of them so instead of using ```pn_buffer_bytes``` once to get the whole buffer using it twice in succession will get both segments if the buffer has wrapped. 2. As a hacky way to manage a grow only buffer that is never in practice defragged anyway - I think all uses of ```pn_buffer_memory`` are like this. We should just introduce a new buffer api for these cases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org