Skip to content

Streaming API to write messages #111

Open
@Shatur

Description

@Shatur

Currently in order to send a message, I need to pass anything that converts into Bytes.
But this prevents users from re-using the memory. Bytes cheaply clonable, but can't grow, so users can't use it a buffer for snapshots. Vec<u8> can be used as a buffer for snapshots, but it needs to be cloned to send (because conversion from Vec<u8> to Bytes implemented only from owning value).
Maybe provide a streaming API instead where you write messages directly into Renet's message buffer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions