c++osccinder

Can you send and receive OSC data in the same Cinder file?


I have a cpp file that is sending data to a python script. In turn this script is sending data back to Cinder and I'm wondering if I can set up a receiver as well. I'm using the OSC block that comes with Cinder, and I'm a little confused because in the Sender sample the constructor is written

OSCTestApp::OSCTestApp() : mSender(10000, destinationHost, destinationPort){}

and in the Receiver sample the constructor is written

OSCTestApp::OSCTestApp():mReceiver(10001){}

So how do you combine the two?

Thanks


Solution

  • The answer is surprisingly simple:

    OSCTestApp::OSCTestApp() : App(), mReceiver(9000), mSender(8000, destinationHost, destinationPort){}