
socket.addEventListener('message', function (event) {
    console.log('Message from server ', JSON.parse(event.data));
});
socket.addEventListener('close', function (event) {
    console.log('Connection closed', event);
});
socket.addEventListener('open', function (event) {
    console.log('Connection opened', event);

    // Call subtract with positional parameters (42-23)
    send(socket, `
        {"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1}
    `);
    // Call subtract with rev