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

Enforce buffer ownership using Send #3

Open
pderop opened this issue Jul 7, 2022 · 0 comments
Open

Enforce buffer ownership using Send #3

pderop opened this issue Jul 7, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@pderop
Copy link
Collaborator

pderop commented Jul 7, 2022

This issue is related to the #1 PR.

When a user is "giving " a buffer to the Multipart API, it's the responsibility of the MP API to close the user buffer. Now, to enforce transfer of resource ownership, maybe we should consider to use Send signatures in some of the Multipart API methods.

Maybe for example we could add the following:

  1. A new __HttpPostMultipartRequestDecoder.offer(Send<HttpContent> content) method could be added , in addition to old HttpPostMultipartRequestDecoder.offer(HttpContent content)
  2. Add __HttpData.setContent(Send<Buffer> buffer) method
  3. Add HttpData.addContent(Send<Buffer> buffer, boolean last)
@pderop pderop added the enhancement New feature or request label Jul 7, 2022
@pderop pderop self-assigned this Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant