client library - cant detect disconnection
in
Core Library Questions
•
2 years ago
Hello,
I use processings client library.
it works very well, but i cant detect disconnection.
I cant make a 'keep-alive' connection.
When client disconnects; i want to try reconnect again..
Pls help.
Thank You.
import processing.net.*;
void setup() {
size(1024, 768);
background(255);
smooth();
k1ip = "127.0.0.1";
k2ip = "127.0.0.1";
k1Client = new Client(this, k1ip, 7000);
k2Client = new Client(this, k2ip, 7001);
}
void draw() {
if (k1Client.available() > 0) {
dataIn = k1Client.readBytes();
.....
}
}
1