Skip to content

Commit

Permalink
Add the preview1 sock_accept function declaration to the polyfill. (b…
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Feb 4, 2023
1 parent 3c4e2ff commit b81c321
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,13 @@ pub unsafe extern "C" fn random_get(buf: *mut u8, buf_len: Size) -> Errno {
})
}

/// Accept a new incoming connection.
/// Note: This is similar to `accept` in POSIX.
#[no_mangle]
pub unsafe extern "C" fn sock_accept(fd: Fd, flags: Fdflags, connection: *mut Fd) -> Errno {
unreachable!()
}

/// Receive a message from a socket.
/// Note: This is similar to `recv` in POSIX, though it also supports reading
/// the data into multiple buffers in the manner of `readv`.
Expand Down

0 comments on commit b81c321

Please sign in to comment.