Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packets, contiguous memory, and buffer chains #94

Closed
guruofquality opened this issue Jan 29, 2015 · 1 comment
Closed

packets, contiguous memory, and buffer chains #94

guruofquality opened this issue Jan 29, 2015 · 1 comment

Comments

@guruofquality
Copy link
Contributor

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...

@guruofquality
Copy link
Contributor Author

This issue was moved to pothosware/PothosCore#62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant