OSCP5 NETP5 println() problem
in
Contributed Library Questions
•
11 months ago
Hi everyone,
I am trying to build an interaction between 2 agents (i.e. a manager and a client) and I use println() function to see intermediate results. For some reason, when I run two programs simultaneously on the same computer, the output is being printed in a wrong console... For example, even in the simple program (see below) the output text is printed on console of the agent that clicked her display window first (while it is supposed to print "manager" for manager and "client1" for client1).
Does anyone know what could be the problem here? Thanks!
//MANAGER
import oscP5.*;
import netP5.*;
OscP5 manager;
NetAddress player1;
NetAddress player2;
void setup(){
manager = new OscP5(this,8000);
player1 = new NetAddress("127.0.0.1",9001);
}
void mouseReleased(){
println("MANAGER");
}
//CLIENT1
import oscP5.*;
import netP5.*;
OscP5 player1;
NetAddress manager;
void setup(){
player1 = new OscP5(this,9001);
manager = new NetAddress("127.0.0.1",8000);
}
void mouseReleased(){
println("CLIENT1");
}
1