Skip to content

[syft.js] Handle large messages in data channel #78

@vvmnnnkv

Description

@vvmnnnkv

Data channel is limited to a certain size (depending on the browser) with the safe max value of around 16kb.
Update webrtc.js's sendMessage to handle large binary messages, such as protobuf blobs.

This involves:

  • Split large messages into parts
  • Basic protocol for split data, like header and number of parts (+ we don't need to split small messages)
  • Control of bufferedAmount
  • Concat on the other side and error checking

Example:
https://webrtc.github.io/samples/src/content/datachannel/datatransfer/

Metadata

Metadata

Assignees

Labels

Type: Epic 🤙Describes a large amount of functionality that will likely be broken down into smaller issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions