Skip to content

syscall: add WASI sock_accept #3061

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

Closed

Conversation

rvolosatovs
Copy link
Contributor

@rvolosatovs rvolosatovs commented Aug 7, 2022

Extracted from #2748
This PR adds functionality to be able to call the syscall directly. #2748 uses this syscall to implement net.Listener for WASI

Note that this calls into WASI directly without using libc. Note, also that this syscall is similar to, but different from standard Linux accept{,4}

Refs WebAssembly/WASI#458

Unverified

The committer email address is not verified.
Signed-off-by: Roman Volosatovs <[email protected]>
@rvolosatovs
Copy link
Contributor Author

@aykevl @dgryski any update on this PR? Are there any concerns regarding the feature?

Is there any way I can assist in getting this reviewed?

@dgryski
Copy link
Member

dgryski commented Aug 22, 2022

I'll try to take a look this week.

@deadprogram
Copy link
Member

@dgryski any chance to look at this? 😸

@codefromthecrypt
Copy link
Contributor

maybe make a code comment about it being different than accept/4?

you could also cite the reference impl which seems to only pass only two values as flags: 0 or non block WebAssembly/wasi-libc@63e4489#diff-07a5fd5db4b7b518204f053b8fa5f30506522395b61764e5d804931346335725

@aykevl
Copy link
Member

aykevl commented Sep 15, 2022

To be honest, I think it's better to do this directly in the net package. The syscall package is deprecated and frozen upstream, and this adds some unnecessary API surface that we will have to maintain.

@rvolosatovs
Copy link
Contributor Author

rvolosatovs commented Sep 26, 2022

To be honest, I think it's better to do this directly in the net package. The syscall package is deprecated and frozen upstream, and this adds some unnecessary API surface that we will have to maintain.

Closing, will rework using suggested approach (in #2748)

@rvolosatovs rvolosatovs deleted the syscall/wasi-sock-accept branch September 26, 2022 10:05
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.

None yet

5 participants