Skip to content

Enforce buffer ownership using Send #3

@pderop

Description

@pderop

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)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions