-
Notifications
You must be signed in to change notification settings - Fork 108
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
Updated file transfer receive code. #371
Updated file transfer receive code. #371
Conversation
For ref. #370 |
file.receiving = false; | ||
file.valid = true; | ||
Logger.Info('Received complete file'); | ||
const transferDuration = new Date().getTime() - file.timestampStart; | ||
const transferBitrate = Math.round((file.size * 16 * 1024) / transferDuration); | ||
const transferBitrate = Math.round((file.chunks * maxPayloadSize) / transferDuration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think maxPayloadSize
should be maxMessageSize
. The transfer bitrate calculation should still include the 5 byte header because even though it wasn't used in the file contents, it was still transferred data.
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
[UE5.3] Merge pull request #371 from mcottontensor/file-transfer-clarity
[UE5.4] Merge pull request #371 from mcottontensor/file-transfer-clarity
[UE5.5] Merge pull request #371 from mcottontensor/file-transfer-clarity
Relevant components:
Problem statement:
The code for reading file content over the data channel was confusing and hard to decipher leading to accusations of it being incorrect.
Solution
Renamed some variables and added some more descriptive constants to allow easier readability.