Skip to content

Allow reading frames into user-provided buffer to avoid allocations #127

@B3rC

Description

@B3rC

Hi!

I’m trying to eliminate memory allocations when using my websocket handler, but read_frame currently allocates a new Vec for (almost) every incoming frame.

Would it be possible to provide an API variant that lets users supply a buffer to read into, avoiding these allocations? Or do you know of any workaround for this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions