Skip to content

Sending immediate feedback when receiving a LISTEN command #65

@Thowaah

Description

@Thowaah

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions