Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
=======================================
Coverage 77.16% 77.16%
=======================================
Files 20 20
Lines 635 635
Branches 73 73
=======================================
Hits 490 490
Misses 116 116
Partials 29 29
Continue to review full report at Codecov.
|
cereallarceny
suggested changes
Jan 31, 2020
Member
cereallarceny
left a comment
There was a problem hiding this comment.
This is perfect. I only request that you look at changing the class names to avoid conflicts or confusion.
added 2 commits
February 1, 2020 00:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements data chunking, issue #78
Data is sent as ArrayBuffer, with small header containing message id, number of chunks and chunk number. On receiver side, chunks are stitched together.
There're number of constants that control sending process:
Outgoing buffer is where data is buffered after channel.send() but before it is actually sent. When buffer fills up to WEBRTC_DATACHANNEL_MAX_BUFFER, we stop sending and wait for lowbuffer event from the data channel. If event doesn't occur within WEBRTC_DATACHANNEL_BUFFER_TIMEOUT, we re-try checking current buffer size. If the buffer is still larger than WEBRTC_DATACHANNEL_MAX_BUFFER after checking for WEBRTC_DATACHANNEL_MAX_BUFFER_TIMEOUTS times, we consider this to be send error.
I've tested sending 150MB between FF and Chrome located on different remote machines connected via public internet.