Skip to content

[library_sockfs.js] Cleanup buffer handling in sendmsg #22987

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

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 21, 2024

No description provided.

@sbc100 sbc100 force-pushed the sockfs_buffer_handling branch from c7f0ade to 0d57262 Compare November 21, 2024 22:58
} else {
#endif
data = buffer.slice(offset, offset + length);
var data = buffer.slice(offset, offset + length);
#if PTHREADS
Copy link
Member

Choose a reason for hiding this comment

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

Separately, should this be #if SHARED_MEMORY so it works with WASM_WORKERS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed... maybe a followup?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good.

@sbc100 sbc100 force-pushed the sockfs_buffer_handling branch from 0d57262 to 1986d7d Compare November 22, 2024 00:33
@sbc100 sbc100 enabled auto-merge (squash) November 22, 2024 00:50
Extracting the `buffer.slice` expression made the code cleanup and
showed the double `new Uint8Array` to be redundant (AFAICT).
@sbc100 sbc100 force-pushed the sockfs_buffer_handling branch from 1986d7d to ec8e26e Compare November 25, 2024 17:57
@sbc100 sbc100 merged commit 539a197 into emscripten-core:main Nov 25, 2024
28 checks passed
@sbc100 sbc100 deleted the sockfs_buffer_handling branch November 25, 2024 19:06
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 7, 2024
In emscripten-core#22987 I added a new veriant of the test_nodejs_sockets_echo test
and chose the next consecutive port number, but it seems that each
test ends up using two ports numbers so this could conflicted with
the tests that were using both the previous and next number in the
sequence (59164 and 59166).
sbc100 added a commit that referenced this pull request Dec 7, 2024
In #22987 I added a new veriant of the test_nodejs_sockets_echo test and
chose the next consecutive port number, but it seems that each test ends
up using two ports numbers so this could conflicted with the tests that
were using both the previous and next number in the sequence (59164 and
59166).
sbc100 added a commit to sbc100/emscripten that referenced this pull request Dec 9, 2024
In emscripten-core#22987 I added a new veriant of the test_nodejs_sockets_echo test and
chose the next consecutive port number, but it seems that each test ends
up using two ports numbers so this could conflicted with the tests that
were using both the previous and next number in the sequence (59164 and
59166).
hedwigz pushed a commit to hedwigz/emscripten that referenced this pull request Dec 18, 2024
In emscripten-core#22987 I added a new veriant of the test_nodejs_sockets_echo test and
chose the next consecutive port number, but it seems that each test ends
up using two ports numbers so this could conflicted with the tests that
were using both the previous and next number in the sequence (59164 and
59166).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants