Added socket send and recv timeout options (#1419)
Added socket send and recv timeout options with implementation for posix platform. This is part of a extending support for sockets in WASI. #1336. Also add sample that sets and reads back the send and receive timeouts using the native function binding.
This commit is contained in:
@ -82,4 +82,17 @@ Data:
|
||||
And mourns for us
|
||||
```
|
||||
|
||||
`socket_opts.wasm` shows an example of getting and setting various supported socket options
|
||||
```bash
|
||||
$ ./iwasm ./socket_opts.wasm
|
||||
```
|
||||
|
||||
The output is:
|
||||
```bash
|
||||
[Client] Create socket
|
||||
recv_timeout is expected
|
||||
send_timeout is expected
|
||||
[Client] Close socket
|
||||
```
|
||||
|
||||
Refer to [socket api document](../../doc/socket_api.md) for more details.
|
||||
|
||||
Reference in New Issue
Block a user