I am trying to create a new processing net sketch and I always get this error
Client got end-of-stream.
I am using 2 sketches the client and the server
the client is
import processing.net.*;
Client cln;
void setup() {
size(500,500);
cln = new Client(this,"ip adress",5204);
}
void draw() {
}
and the server is basically
import processing.net.*;
Server serv;
Client player1;
Client player2;
Client player3;
Client player4;
void setup() {
serv = new Server(this,5204);
while (player1 == null) {
player1 = serv.available();
}
while (player2 == null) {
player2 = serv.available();
}
while (player3 == null) {
player3 = serv.available();
}
while (player4 == null) {
player4 = serv.available();
}
}
the actual code is longer but here I am just showing the important part
I put a breakpoint in this line :
player2 = serv.available();
so the debugger would be halted when player1 connects, instead of this I am getting this error
I would be very pleased if someone help me