//-------------------------------------------------------------- void testApp::keyPressed(int key) { if (!publisher.send("this is a test")) { cout << "send failed" << endl; } }
//-------------------------------------------------------------- void testApp::setup() { // start server publisher.bind("tcp://*:9999"); // start client subscriber.connect("tcp://localhost:9999"); }
//-------------------------------------------------------------- void testApp::keyPressed(int key) { publisher.send("this is a test"); }