Commit Graph

3 Commits

Author SHA1 Message Date
Callum Macmillan
5ddc335a7f
Add timeout send/recv and multicast client/server socket examples ()
Add a couple of socket examples that can be used with WAMR:
- The `timeout_client` and `timeout_server` examples demonstrate socket
  send and receive timeouts using the socket options
- The `multicast_client` and `multicast_server` examples demonstrate receiving
  multicast packets in WASM

And add several macro controls for `socket_opts` example.
2022-10-07 10:31:21 +08:00
liang.he
1effda4cb5
Fix isssues detected by coverity ()
Add return value checks
Append string terminator
2022-09-29 13:28:18 +08:00
Wenyong Huang
78b5c5b484
Merge dev/socket into main ()
Implement more socket APIs, refer to  and below PRs:
- Implement wasi_addr_resolve function ()
- Fix socket-api byte order issue when host/network order are the same ()
- Enhance sock_addr_local syscall ()
- Implement sock_addr_remote syscall ()
- Add support for IPv6 in WAMR ()
- Implement ns lookup allowlist ()
- Implement sock_send_to and sock_recv_from system calls ()
- Added http downloader and multicast socket options ()
- Fix `bind()` calls to receive the correct size of `sockaddr` structure ()
- Assert on correct parameters ()
- Copy only received bytes from socket recv buffer into the app buffer ()

Co-authored-by: Marcin Kolny <mkolny@amazon.com>
Co-authored-by: Marcin Kolny <marcin.kolny@gmail.com>
Co-authored-by: Callum Macmillan <callumimacmillan@gmail.com>
2022-09-22 21:46:14 +08:00