Skip to content

Support receiving fragmented messages without reassembly #479

@aaugustin

Description

@aaugustin

Based on a suggestion by @cjerdonek in #296, I'm creating this new issue for clarity.

When receiving a fragmented message, it might be desireable to obtain the fragments without reassembling, to avoid a memory copy which may not be necessary.

Most likely this could be enabled by providing a variant of recv. I'd say it should be a separate function because it would have a different return type.

That function could return an async iterator (after we drop support for Python 3.4).

max_size should be re-interpreted as the maximum size of each chunk / frame rather than message.

The original suggestion was a file-like object. This needs some thought. It may require a layer of buffering which may negate the performance benefits.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions