Skip to content
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

Sending immediate feedback when receiving a LISTEN command #65

Open
Thowaah opened this issue Mar 18, 2024 · 0 comments
Open

Sending immediate feedback when receiving a LISTEN command #65

Thowaah opened this issue Mar 18, 2024 · 0 comments

Comments

@Thowaah
Copy link

Thowaah commented Mar 18, 2024

I would suggest to change the described behaviour of what happens after receiving a LISTEN command from clients.

I think the clients that sends a LISTEN command will be interested in getting the most recent value associated with the address it listens to. Instead of having it send a LISTEN and the fetch the value through an HTTP query, I would suggest that the default behaviour after receiving an update would be to send the value to the client that just registered as a listener.

Current behaviour according to spec

OSC SENDER             - - - - - - - - - - - - -\- - - - - - - - - - - - - - >
                                                 \
                                            /foo value update
                                                   \
OSCQuery SERVER    - - - - - x - - - - - - - - - - - x - - \ - - - - - - - - >
                           /                                 \
                    LISTEN /foo                         feddback /foo
                        /                                       \
OSCQuery CLIENT     - / - - - - - - - - - - - - - - - - - - - - - x - - - - >

New behaviour with immediate feedback

OSC SENDER             - - - - - - - - - - - - -\- - - - - - - - - - - - - - >
                                                 \
                                            /foo value update
                                                   \
OSCQuery SERVER    - - - - - x - \ - - - - - - - - - x - - \ - - - - - - - - >
                           /      \                          \
                    LISTEN /foo  feddback /foo            feddback /foo
                        /           \                            \
OSCQuery CLIENT     - / - - - - - - - x - - - - - - - - - - - - - x - - - - >

Proposed change

In the client -> server communication section, the LISTEN command is descibed as follow:

LISTEN If the server receives a websocket message with "LISTEN" as the provided "COMMAND", the value associated with "DATA" must be a string describing an OSC method in the server's address space. LISTEN messages indicate that the client wants to "listen" to any OSCS messages sent to a given method in the server's address space. After receiving this message, the server will immediately begin passing all OSC messages sent to that method to every client that requested to "LISTEN" to it.

I would suggest to change the described behaviour of what happens after the LISTEN message is received to something like this:

After receiving this message, the server will immediately send a value feedback to the client and begin passing all OSC messages sent to that method to every client that requested to "LISTEN" to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant