Skip to content

Commit

Permalink
add WASIp2 TODO comments
Browse files Browse the repository at this point in the history
// TODO #1: Add a public, WASIp2-only API for registering
// `wasi::io::poll::Pollable`s directly (i.e. those which do not correspond to
// any `wasi-libc` file descriptor, such as `wasi:http` requests).
//
// TODO #2: Add support for binding, listening, and accepting.  This would
// involve adding cases for `TCP_SOCKET_STATE_UNBOUND`,
// `TCP_SOCKET_STATE_BOUND`, and `TCP_SOCKET_STATE_LISTENING` to the `match`
// statements in `Selector::select`.
//
// TODO #3: Add support for UDP sockets.  This would involve adding cases for
// the `UDP_SOCKET_STATE_*` tags to the `match` statements in
// `Selector::select`.

Signed-off-by: Joel Dice <[email protected]>
  • Loading branch information
dicej committed Oct 10, 2024
1 parent 229e04b commit fae1ac4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/sys/wasi/p2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
// API (see the `netc` module below) to do so. Once
// https://github.com/WebAssembly/wasi-libc/issues/542 is addressed, we'll be
// able to switch to a public API.
//
// TODO #1: Add a public, WASIp2-only API for registering
// `wasi::io::poll::Pollable`s directly (i.e. those which do not correspond to
// any `wasi-libc` file descriptor.
//
// TODO #2: Add support for binding, listening, and accepting. This would
// involve adding cases for `TCP_SOCKET_STATE_UNBOUND`,
// `TCP_SOCKET_STATE_BOUND`, and `TCP_SOCKET_STATE_LISTENING` to the `match`
// statements in `Selector::select`.
//
// TODO #3: Add support for UDP sockets. This would involve adding cases for
// the `UDP_SOCKET_STATE_*` tags to the `match` statements in
// `Selector::select`.

use crate::{Interest, Token};
use netc as libc;
Expand Down

0 comments on commit fae1ac4

Please sign in to comment.