Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: increase WebRTC max datachannel message size #2627

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

achingbrain
Copy link
Member

The 16KB limit was fixed in browsers quite a while back so we should be able to increase the max datachannel message size to 256KB at least.

Fixes #2612

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

The 16KB limit was fixed in browsers quite a while back so we should
be able to increase the max datachannel message size to 256KB at
least.

Fixes #2612
@achingbrain achingbrain requested a review from a team as a code owner July 18, 2024 15:45
maschad
maschad previously approved these changes Jul 18, 2024
@maschad maschad dismissed their stale review July 18, 2024 16:53

Seems like there's an issue with length prefix encoding larger chunks

Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

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

Seems like there's an issue with length prefix encoding larger chunks

@achingbrain achingbrain merged commit 9e92b0c into main Jul 22, 2024
24 checks passed
@achingbrain achingbrain deleted the fix/increase-webrtc-max-message-size branch July 22, 2024 12:50
@achingbrain achingbrain mentioned this pull request Jul 22, 2024
@sukunrt
Copy link
Member

sukunrt commented Sep 2, 2024

Large messages break compatibility with go-libp2p and also possibly with rust-libp2p(https://github.com/libp2p/rust-libp2p/blob/master/misc/webrtc-utils/src/stream.rs#L47). go-libp2p will not read messages larger than 16KB.

This also requires a change in specs. https://github.com/libp2p/specs/blob/1fec30e9fbab36ec687251ea528bf5847723dcff/webrtc/README.md?plain=1#L91

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.

Increase WebRTC max message size
3 participants