Skip to content
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(socket): berkeley socket API v2 #459

Closed
wants to merge 6 commits into from

Conversation

robberphex
Copy link

No description provided.

3miliano and others added 6 commits August 18, 2020 12:47
…lve, sock_open, sock_connect

feat(socket): added port to addr_resolve so DNS SRV records can also be searched

feat(socket): added new rights, removed local socket

feat(socket): added missing sock_bind, sock_listen, sock_accept

feat(socket): add address family

feat(socket): added new rights for bind and accept

feat(socket): removed sock_shutdown perm. might bring it back.

feat(socket): changed recv to not use iovec since there is pread for that

feat(socket): sock_send now uses regular buffer rather than iovecs

feat(socket): added sock_addr_local and sock_addr_remote

feat(socket): added sock_close, sock_set_reuse_addr and sock_set_reuse_port

feat(socket): added sock_set_recv_buf_size and sock_get_recv_buf_size

feat(socket): added sock_set_send_buf_size, sock_get_send_buf_size

feat(socket): added sock_send_to and sock_recv_from for UDP

feat(socket): changed sock_open and addr_resolve to receive a handle to an address pool

feat(socket): moved socket API into ephemeral
@robberphex
Copy link
Author

I noticed that there is a network API implementation bytecodealliance/wasm-micro-runtime#836 .
@lum1n0us Could you check this PR?

@lum1n0us
Copy link

@robberphex 👍

@linclark
Copy link
Member

Thanks for looking into this, @robberphex

Unfortunately while the previous PR was dormant, WASI as a whole has been in a process of transition. The original witx format was intended as a stop-gap until Interface Types were more fully developed. We've now developed the wit format which we are transitioning to. You can see more about this in the notes from the last WASI meeting, and I plan to update the repo (based on #451) this week.

Given that, the next steps for this to move forward would be having a champion step forward to move the proposal through the Phase process, moving it to its own repo and rewriting it in the wit format.

@badeend
Copy link
Contributor

badeend commented Jan 25, 2022

To those who are interested; I've created a draft proposal at: https://github.com/badeend/WASI-Networking

lum1n0us added a commit to lum1n0us/wasm-micro-runtime that referenced this pull request Feb 22, 2022
Refer to [WASI PR#459](WebAssembly/WASI#459)

Users use `--addr-pool=` to identify an valid ip address range
lum1n0us added a commit to lum1n0us/wasm-micro-runtime that referenced this pull request Feb 22, 2022
Refer to [WASI PR#459](WebAssembly/WASI#459)

Users use `--addr-pool=` to identify an valid ip address range
lum1n0us added a commit to lum1n0us/wasm-micro-runtime that referenced this pull request Feb 22, 2022
Refer to [WASI PR#459](WebAssembly/WASI#459)

Users use `--addr-pool=` to identify an valid ip address range
lum1n0us added a commit to lum1n0us/wasm-micro-runtime that referenced this pull request Feb 23, 2022
Refer to [WASI PR#459](WebAssembly/WASI#459)

Users use `--addr-pool=` to identify an valid ip address range
wenyongh pushed a commit to bytecodealliance/wasm-micro-runtime that referenced this pull request Feb 23, 2022
Refer to [ Networking API design](WebAssembly/WASI#370) and [feat(socket): berkeley socket API v2](WebAssembly/WASI#459)

Support the socket API of synchronous mode, including socket/bind/listen/accept/send/recv/close/shutdown,
the asynchronous mode isn't supported yet.
Support adding `--addr-pool=<pool1,pool2,..>` argument for command line to identify the valid ip address range.
And add the sample.
wenyongh added a commit to bytecodealliance/wasm-micro-runtime that referenced this pull request Mar 10, 2022
Refer to [Networking API design](WebAssembly/WASI#370)
and [feat(socket): berkeley socket API v2](WebAssembly/WASI#459):

- Support the socket API of synchronous mode, including `socket/bind/listen/accept/send/recv/close/shutdown`,
    the asynchronous mode isn't supported yet.
- Support adding `--addr-pool=<pool1,pool2,..>` argument for command line to identify the valid ip address range
- Add socket-api sample and update the document
xujuntwt95329 pushed a commit to xujuntwt95329/wasm-micro-runtime that referenced this pull request Mar 13, 2022
…#1036)

Refer to [Networking API design](WebAssembly/WASI#370)
and [feat(socket): berkeley socket API v2](WebAssembly/WASI#459):

- Support the socket API of synchronous mode, including `socket/bind/listen/accept/send/recv/close/shutdown`,
    the asynchronous mode isn't supported yet.
- Support adding `--addr-pool=<pool1,pool2,..>` argument for command line to identify the valid ip address range
- Add socket-api sample and update the document
@@ -2011,7 +2006,7 @@ The path at which to create the directory.

#### <a href="#path_filestat_get" name="path_filestat_get"></a> `path_filestat_get(fd: fd, flags: lookupflags, path: string) -> Result<filestat, errno>`
Return the attributes of a file or directory.
Note: This is similar to `fstatat` in POSIX.
Note: This is similar to `stat` in POSIX.

Choose a reason for hiding this comment

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

Suggested change
Note: This is similar to `stat` in POSIX.
Note: This is similar to `fstat` in POSIX.

@linclark
Copy link
Member

Since someone else has picked up the socket work in wasi-sockets, I think we can close this one out.

@linclark linclark closed this May 23, 2022
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…#1036)

Refer to [Networking API design](WebAssembly/WASI#370)
and [feat(socket): berkeley socket API v2](WebAssembly/WASI#459):

- Support the socket API of synchronous mode, including `socket/bind/listen/accept/send/recv/close/shutdown`,
    the asynchronous mode isn't supported yet.
- Support adding `--addr-pool=<pool1,pool2,..>` argument for command line to identify the valid ip address range
- Add socket-api sample and update the document
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.

6 participants