Hello,
I tried to reproduce examples from the processing network library for pactise sockets data exchanges.
I used the Processing library reference example :
import processing.net.*;
Server myServer;
int val = 0;
void setup() {
size(200, 200);
// Starts a myServer on port 5204
myServer = new Server(this, 5204);
}
void draw() {
val = (val + 1) % 255;
background(val);
myServer.write(val);
}
But the Processing 3.5.4 IDE underlined an error on the line:
myServer = new Server(this, 5204);
saying “The constructor “Server(Server, int)” does not exist”.
Idem for the line:
myServer.write(val);
saying “The function “write(int)” does not exist”.
It looks like the Server class is not implemented in the network library.
I tried the Client example, with no compilation error.
Of course, nothing happened when executing since there was no server !
Can somebody help me ? What did I do wrong ?