-
Notifications
You must be signed in to change notification settings - Fork 57
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
added support for no reply methods #50
Conversation
Interesting idea. We can support this, but I don't like the idea of differentiating empty string and null like this. Instead add |
Fair enough, I originally had it that way but then the outSignature seemed redundant so I switched it to null. But this is more readable. I have updated the PR. New Example: @method({inSignature: '', outSignature: '', noReply: true})
MethodWithNoReply() {
} I added a test but I wasn't actually able to run the test. I kept getting |
Use |
Yea, sorry it gives the same error. I tried a few different environments, ubuntu, windows, on my raspberry pi itself. All gave the same error.
I'm not super familiar with jest so I assume I must be doing something wrong. I don't know why it's saying there are no matches when the files are clearly there:
|
I figured it out, it didn't like me running them from inside node_modules. They are running now. |
So they all passed.
One thing I did want to mention, the reason I added the test was I wasn't sure where you were converting the introspection json to actual XML, so I wasn't sure if I was doing it right. So that led me to the tests but the tests don't actually do this either. |
Yeah it works fine. It just needs some documentation and it's good. |
Let me know if that latest commit is ok, or if you were looking for something else. |
Yeah that's ok. 👍 . |
I was working with the bluez dbus api and there are several methods that error with AccessDenied because they are not expecting a reply at all. So to avoid having to add a customer handler for all the methods I added simple way to indicate that a method does not need to send a reply.
Example
I thought you might be interested in this because this use case is called out in the readme for the customer message handler.