You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the liblo c/c++ osc library, one can specify a method which matches a osc message based on address and types:
/* add method that will match the path /foo/bar, with two numbers, coerced
* to float and int */
lo_server_thread_add_method(st, "/foo/bar", "fi", foo_handler, NULL);
So "/error", "sis" matches a other message then "/error", "f"
This sounds more like some kind of abstraction that could be built on top of what's offered in this package, rather than something that should be included in the package itself.
Hey @avlapp. Yes, this should is possible since go-osc fully supports type tags. We could extend the StandardDispatcher for example and a new method AddMsgHandlerWithTypespec(addr string, typespec string, handler HandlerFunc) or add a new dispatcher type.
Need to think a little bit about it how the best interface would look like. What do you think @glynternet and @avlapp ?
In the liblo c/c++ osc library, one can specify a method which matches a osc message based on address and types:
So "/error", "sis" matches a other message then "/error", "f"
Is this possible with go-osc?
I see there references to a 'OSC Type Tag String' in the code, but not sure if or how this can be used for pattern matching:
https://github.com/hypebeast/go-osc/blob/cec5a8a1e5f5/osc/osc.go#L220
https://github.com/hypebeast/go-osc/blob/cec5a8a1e5f5/osc/osc.go#L282
Liblo:
https://github.com/radarsat1/liblo/blob/master/examples/example_server.c
https://github.com/radarsat1/liblo/blob/master/lo/lo_types.h
The text was updated successfully, but these errors were encountered: