gogins / csound-webserver-opcodes

The "webserver" opcodes enable Csound to act as a local Web server that can host HTML5 GUIs and score generators.
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Server sent events #17

Closed gogins closed 2 years ago

gogins commented 2 years ago

Use server-sent events to implement:

gogins commented 2 years ago
gogins commented 2 years ago

I'm not sure how general-purpose this will be, there is a primitive wire format like this:

event:message
data:{0}

I'm not sure whether or how to deal with two newlines in the body of the data.

Solution: Use one data: line, which contains any JSON-encoded data.

gogins commented 2 years ago

I think this is done. It works for the Csound message callback, so should work for other event sources.