mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Fix some more socket bugs
- The functions that return a sockaddr now do so the same way the Linux Kernel does across platforms, e.g. getpeername(), accept4() - Socket system calls on Windows will now only check for interrupts when a blocking operation needs to be performed. - Write tests for recvfrom() system call
This commit is contained in:
parent
ac92f25296
commit
0ba3199915
49 changed files with 347 additions and 352 deletions
|
@ -27,10 +27,9 @@
|
|||
textwindows ssize_t sys_send_nt(int fd, const struct iovec *iov, size_t iovlen,
|
||||
uint32_t flags) {
|
||||
ssize_t rc;
|
||||
uint32_t sent = -666;
|
||||
uint32_t sent;
|
||||
struct SockFd *sockfd;
|
||||
struct NtIovec iovnt[16];
|
||||
if (_check_interrupts(true, g_fds.p)) return -1;
|
||||
struct NtOverlapped overlapped = {.hEvent = WSACreateEvent()};
|
||||
if (!WSASend(g_fds.p[fd].handle, iovnt, __iovec2nt(iovnt, iov, iovlen), 0,
|
||||
flags, &overlapped, NULL)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue