You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few cases that come up where we end up copying buffers to form a contiguous buffer for a packet message:
Consider the label deframer which might concatenate several buffers to form a complete packet.
Consider a protocol framer which appends a protocol header with a payload buffer.
It might be desirable to have a chain of buffers constitute a packet and to pass this chain around instead. This would allow the consumer to decide that it must copy them into contiguous memory to perform useful work. In some cases, the buffers can just be forwarded, truncated, and sliced up as-is and we want to enable this possibility.
This basic concept already applies to the stream domain, it would be nice to bring it over to the packet domain and allow for the two to interchange fairly easily. We might create a BufferChain object which is basically a vector/list/queue of BufferChunks with some convenience routines for removal, pushing to a stream, overall length, appending...
From @guruofquality on January 29, 2015 4:57
There are a few cases that come up where we end up copying buffers to form a contiguous buffer for a packet message:
It might be desirable to have a chain of buffers constitute a packet and to pass this chain around instead. This would allow the consumer to decide that it must copy them into contiguous memory to perform useful work. In some cases, the buffers can just be forwarded, truncated, and sliced up as-is and we want to enable this possibility.
This basic concept already applies to the stream domain, it would be nice to bring it over to the packet domain and allow for the two to interchange fairly easily. We might create a BufferChain object which is basically a vector/list/queue of BufferChunks with some convenience routines for removal, pushing to a stream, overall length, appending...
Copied from original issue: pothosware/pothos-library#94
The text was updated successfully, but these errors were encountered: