events-backend: initial req/res protocol
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -86,7 +86,14 @@ backend.add(
|
||||
});
|
||||
ws.onopen = () => {
|
||||
console.log('DEBUG: ws.onopen');
|
||||
ws.send('derp!');
|
||||
ws.send(
|
||||
JSON.stringify([
|
||||
'req',
|
||||
1,
|
||||
'subscribe',
|
||||
{ id: 'derp', topics: ['test'] },
|
||||
]),
|
||||
);
|
||||
};
|
||||
ws.onmessage = event => {
|
||||
console.log(`DEBUG: event=`, event.data);
|
||||
|
||||
Reference in New Issue
Block a user