I'm looking at someones code (not contactable) and they have set up a websocket client that talks to a server and runs some C++ code. This is for the new Chrome PPAPI. I can pass variables from the client to the server but I'm not sure how to relay them to the C++ side of things to alter what happens in the code?
So if the client passes a 1 the C++ code does one thing and if a 2 it does another. I just can't see how it's doing it.
The JavaScript that seems to start the C++ code running is:
function onStartTest(e)
{
console.log('Start Test');
var hostname = document.getElementById('hostname').value;
var message = 'start:'+hostname;
common.logMessage(message);
common.naclModule.postMessage(message);
e.preventDefault();
return false;
}
I've looked at a few examples to no avail.