wasm-micro-runtime/samples/socket-api/wasm-src
Marcin Kolny f96773410a
Fix bind() calls to receive the correct size of sockaddr structure (#1490)
For some implementations (e.g. Mac OS) `bind()` requires the length to be exactly
equal to either `sockaddr_in` or `sockaddr_in6` structure. Because we always used
 `sizeof(struct sockaddr_storage)`, `bind()` was returning errors. In this change we
 fix the behavior. See StackOverflow [1] for details.

[1] https://stackoverflow.com/questions/73707162/socket-bind-failed-with-invalid-argument-error-for-program-running-on-macos
2022-09-16 11:09:03 +08:00
..
inc Implement part of Berkeley Socket API for libc-wasi (#1036) 2022-03-10 15:13:38 +08:00
addr_resolve.c Implement getaddrinfo in wasi_socket_ext.c (#1413) 2022-09-02 21:11:58 +08:00
CMakeLists.txt Implement sock_send_to and sock_recv_from system calls (#1457) 2022-09-13 09:00:05 +08:00
send_recv.c Fix socket sample issue reported by coverity (#1397) 2022-08-19 18:06:26 +08:00
socket_opts.c Added http downloader and multicast socket options (#1467) 2022-09-15 17:09:39 +08:00
socket_utils.h Implement sock_send_to and sock_recv_from system calls (#1457) 2022-09-13 09:00:05 +08:00
tcp_client.c Fix bind() calls to receive the correct size of sockaddr structure (#1490) 2022-09-16 11:09:03 +08:00
tcp_server.c Fix bind() calls to receive the correct size of sockaddr structure (#1490) 2022-09-16 11:09:03 +08:00
udp_client.c Implement sock_send_to and sock_recv_from system calls (#1457) 2022-09-13 09:00:05 +08:00
udp_server.c Fix bind() calls to receive the correct size of sockaddr structure (#1490) 2022-09-16 11:09:03 +08:00