-
Notifications
You must be signed in to change notification settings - Fork 749
Added send/recv timeout and multicast socket option examples #1519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fc36004 to
d2949ed
Compare
d2949ed to
d14b5e8
Compare
d14b5e8 to
bfbab21
Compare
| sleep(10); | ||
|
|
||
| printf("Shuting down\n"); | ||
| shutdown(client_socket_fd, SHUT_RDWR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also close(client_socket_fd), the static analysis tool Coverity reports that not all resources are destroyed if close isn't called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 does WAMR have a Coverity project setup / is it supposed to run as part of the github checks? Not sure why, but this commit didn't trigger any checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this is not ran as part of CI because it takes a long time (see conversation in #1529), but I think it'd be good to at least have instructions how to run it manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to run this manually before publishing a PR. @wenyongh Maybe it's something that can be included as part of a contributor guide readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cimacmillan The Coverity server is setup internally, we need to apply the privileges to access it, don't known how to make it available for the Github developers or CI to run, we will investigate more.
004258a to
ac3d7ae
Compare
ac3d7ae to
2b235bb
Compare
|
LGTM |
…tecodealliance#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.
Added a couple of socket option examples that can be used with WAMR.
Extended the sockopts example so that you can specify a specific example, rather than many other example executables. Added two more examples:
timeout- Sets the send recv timeout of a socketmulticast- Receiving multicast datagrams on a WAMR client