-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Enhance demo/async/ to allow async dial by client #1770
base: main
Are you sure you want to change the base?
Conversation
demo/async/client.c - Enable client, on dial, to wait for server that has not yet started demo/async/arun.sh - Run async demo with arbitrary start order of server wrt clients
If the _build/ CMake subdirectory is used to build nng, and then a sub-directory demo_async/ is created under that,
Yes, I know I should figure out how to do it with the CMakeLists.txt, but this was simpler for me. |
The new arun.sh (asynchronous-client run) should yield results similar to these: Run with server starting after all clients
Run with server starting before all clients:
Run with server starting after first three client and before last seven clients:
|
Merged latest nanomsg/nnsg master (2024-03-04). Let me know if there is anything you need to review this PR. Best regards, Brian T. Carcich |
Hey all, I added an asynchronous client to the async demo; it also sends multiple (i.e. hardcoded 3) requests to the server. Let me know if there is anything you need to review this PR, or if it is even worth keeping. Best regards, Brian T. Carcich |
This looks like you're addressing separate issues here. One is to allow non-blocking dialing, and that change looks small and good. The other is the aioclient -- I'm less confident in that. I'd rather these were separate PRs. |
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.
Please separate the small async dialing change for the client into its own PR.
Okay, thanks for the review. ... Done; see #1800. |
demo/async/client.c
demo/async/arun.sh
fixes #<N/A>
P.S. I have not been able to make the client nng_aio_send and
nng_aio_recv routines work, but that is an issue for another day.