-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Feature Request] Add metadata to service respone #279
Comments
I believe the primary design of services is to facilitate request-response style bidirectional communication between primarily two communication partners. On the other hand, |
Correct.
Nope, it's also request-response. You can snoop on third party responses if you want but it's not, strictly speaking, how it is supposed to be used. |
So, in that case how would you handle a situation like this? You have a device A sending the same service request to 2 different devices (B and C). When you receive the responses back, one has succeed while the other one failed. How can you know which device sent each response? Are you assuming the responses will arrive in the same order you sent the request? |
The library should provide the user with sufficient context to distinguish the two responses. |
Well, I suppose let's have a look at your code then. How about preparing a PR showing your changes? |
⚡ Feature Request
Please Describe The Problem To Be Solved
I have a board that needs to send Execute Command request to different boards and handle the response based on who is answering.
(Optional): Suggest A Solution
I've worked on a solution that allows to use a response callback function that contains the metadata so you can use it to "filter" the response based on the node. I'm not sure if this is the best approach nor if it make sense based on the design philosophy of the library.
If you think it can be useful, I already have it working so I'm happy to open a PR to add it.
Thanks.
The text was updated successfully, but these errors were encountered: