-
Notifications
You must be signed in to change notification settings - Fork 428
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
[FEAT] Add net module in lib_ccxr
#1557
Conversation
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Your PR breaks these cases:
Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Your PR breaks these cases:
Check the result page for more info. |
let mut data = Vec::with_capacity(total_len); | ||
|
||
data.extend_from_slice(start.as_bytes()); | ||
data.extend_from_slice("\0".as_bytes()); |
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.
data.extend_from_slice("\0".as_bytes());
Is this necessary?? @elbertronnie
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.
Is this because C code uses memcpy
. But still is this really needed?
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.
t = 1;
if (title != NULL)
t += strlen(title);
// ------- other code -------
if (title != NULL)
memcpy(end, title, t);
end += t;
Yes, because memcpy
will also also copy the NUL
character. This is necessary, otherwise how will the program know where one string starts and other ends. You are not passing the length of each string anyway.
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.
And I was busy for the past week, I will probably review both your PRs tomorrow or day after tomorrow.
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
This is an attempt to split #1495 into multiple independant PRs. Dependant on #1551, #1556 and #1553.
This PR adds networking primitives to send and receive captions across the internet. The networking functions are integrated into C codebase.
NOTE: I was able to test the TCP implementation but I could check if the UDP implementation is correct or not, since there is no way to send caption through UDP.