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