Add timeout send/recv and multicast client/server socket examples (#1519)
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.
This commit is contained in:
@ -94,6 +94,10 @@ ExternalProject_Add(wasm-app
|
||||
socket_opts.wasm ${CMAKE_BINARY_DIR}
|
||||
udp_client.wasm ${CMAKE_BINARY_DIR}
|
||||
udp_server.wasm ${CMAKE_BINARY_DIR}
|
||||
multicast_client.wasm ${CMAKE_BINARY_DIR}
|
||||
multicast_server.wasm ${CMAKE_BINARY_DIR}
|
||||
timeout_client.wasm ${CMAKE_BINARY_DIR}
|
||||
timeout_server.wasm ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_executable(tcp_server ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/tcp_server.c)
|
||||
@ -112,6 +116,14 @@ add_executable(udp_client ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/udp_client.c)
|
||||
|
||||
add_executable(udp_server ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/udp_server.c)
|
||||
|
||||
add_executable(multicast_client ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/multicast_client.c)
|
||||
|
||||
add_executable(multicast_server ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/multicast_server.c)
|
||||
|
||||
add_executable(timeout_client ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/timeout_client.c)
|
||||
|
||||
add_executable(timeout_server ${CMAKE_CURRENT_SOURCE_DIR}/wasm-src/timeout_server.c)
|
||||
|
||||
############################################
|
||||
## Build iwasm with wasi and pthread support
|
||||
############################################
|
||||
|
||||
Reference in New Issue
Block a user