We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello, good morning to you..
i tried to use network libraries and i got an error called:
"the function active() does not exist."
bad !!
here's the simple code used :
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);
if (myServer.active() == true) {
myServer.write(val);
} else {
println("Server is not active.");
}
}
void mousePressed() {
myServer.stop();
}
many thanks for your replies..
bruno.
Answers
Method active() belongs to class Client instead: :-\"https://Processing.org/reference/libraries/net/index.html
https://Processing.org/reference/libraries/net/Client_active_.html
but things strange , it is in the processing server master example that i find this example..i' m lost !!...look :
https://processing.org:8443/reference/libraries/net/Server_active_.html
things i want to do is to transmit data from my i2c raspberry to a client that is far away..and then process my signal... first, processing must works fine with a minimum i think...
i'm beguining in processing...have you a example of client-server applications that client receive what server send ( for example in ascii codes...why not ) or may be an url adresse that poeple makes tests about it....??
bets regards..
bruno.
I don't have any such hardware. Sorry I can help you there. :(
sorry ! bad links ! this one is good... : https://processing.org:8443/reference/libraries/net/Server_active_.html
Oh, indeed. Missed the active() reference for class Server too. =P~
But what I don't understand is why you've got: "the function active() does not exist."
Your example compiles normally for me in my Win7 laptop w/ 64-bit Processing v3.1.2. >-)
@ieee --
If the library is installed then it looks like the method Server.active() should indeed exist -- as per the latest source code:
https://github.com/processing/processing/blob/master/java/libraries/net/src/processing/net/Server.java#L191
you where right Jeremy...i install the lastest version of processing and its works fine...good.. i used to test in the "2" version before on a 32bits system... many thanks to all of you..;)