Skip to content

Conversation

ladvoc
Copy link
Contributor

@ladvoc ladvoc commented Sep 12, 2025

This PR adds a push flag to the data stream header to facilitate the new behavior for sendText and sendBytes in which streams are automatically read and dispatched by the receiver:

WIP implementation in Rust, currently using an internal attribute in place of this flag:

Copy link

changeset-bot bot commented Sep 12, 2025

🦋 Changeset detected

Latest commit: 1828b65

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@ladvoc ladvoc marked this pull request as ready for review September 12, 2025 01:29
@ladvoc ladvoc requested a review from 1egoman September 12, 2025 01:32
string topic = 3;
string mime_type = 4;
optional uint64 total_length = 5; // only populated for finite streams, if it's a stream of unknown size this stays empty
bool push = 6; // stream should be pushed to destination participants without requiring them to explicitly accept it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does more than "just" push though, right? It also internally collects the stream and only forwards the "complete" value.

we could think about making total_length required for push cases as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct; maybe it should be called something other than push? I agree, total_length should be required when "push" is enabled. I can also see possibly adding an option on the receiving end to reject pushed streams over a specified length.

@ladvoc
Copy link
Contributor Author

ladvoc commented Sep 19, 2025

No longer being considered

@ladvoc ladvoc closed this Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants