-
Notifications
You must be signed in to change notification settings - Fork 12
Description
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.