-
Notifications
You must be signed in to change notification settings - Fork 27
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
Should decoder discard messages with invalid address? #25
Comments
I like the idea but the address check should be optional, i.e. configurable. OSC does specify an address pattern syntax but since they're only strings one can match however they like. So, I think it would be sensible to discard messages with invalid addresses by default but still allow to explicitly disable this check. What do you think? |
Very good point, I didn't think about that! I'll whip up a PR after finishing my current PR. |
Thanks for raising the question and I'm looking forward to the PR! |
Are there any plans to implement this? It would be great to turn off address checks. I am actually trying to write some code to control Ardour via OSC> It seems that Ardour uses |
I've been trying to implement a dispatcher and noticed that the current matcher is a bit unergonomic to use. The
OscMessage
's address is only checked for validity in the matcher. This results in having to check for address errors during address matching, which seems like the wrong place to do that, as a dispatcher will attempt to match with every OSC method, but every single one will fail due to the address being invalid, so the same work is done repeatedly.I propose that we instead discard incoming
OscMessage
s in the decoder, as anOscMessage
without a valid address can not ever be matched anyway, and as a consequence always know that anOscMessage
must have a valid address.I wanted to gather thoughts on this before implementing it.
The text was updated successfully, but these errors were encountered: