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(@libp2p/webrtc): set max message size in alignment with spec #2050

Merged
merged 5 commits into from
Sep 15, 2023

Conversation

maschad
Copy link
Member

@maschad maschad commented Sep 13, 2023

According to the webRTC spec The Protobuf framing adds an overhead of 5 bytes. The unsigned-varint prefix adds another 2 bytes. This takes that into account.

Closes #2003

@maschad maschad requested a review from a team as a code owner September 13, 2023 19:49
@maschad maschad changed the title fix(@libp2p/webrtc): set max message size in alignment with spec (#2003) fix(@libp2p/webrtc): set max message size in alignment with spec Sep 13, 2023
@maschad maschad marked this pull request as draft September 13, 2023 20:33
@maschad maschad marked this pull request as ready for review September 14, 2023 16:52
Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

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

LGTM. Small nit with duplicating the constants, comment inline.

packages/transport-webrtc/test/stream.spec.ts Outdated Show resolved Hide resolved
@maschad maschad merged commit 122f1e6 into libp2p:master Sep 15, 2023
17 checks passed
maschad added a commit to maschad/js-libp2p that referenced this pull request Sep 27, 2023
This was referenced Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

discrepancies in webrtc mesage lengths
2 participants