Getting data from port 80
in
Core Library Questions
•
1 year ago
Hello,
I'm trying to get data from local port 80 into my processing sketch but it is not working.
When i put on my browser my host ip and local port (something like 169.254.186.203:80) i can see what was sent to the local port. So I tryed do get that into processing using the following simple WebClient sketch, but it doen't work.
import processing.net.*;
Client myClient;
int dataIn;
void setup() {
size(200, 200);
// Connect to the local machine at port 80.
// This example will not run if you haven't
// previously started a server on this port
myClient = new Client(this, "169.254.186.203", 80); //my ip and local port
}
void draw() {
if (myClient.available() > 0) {
dataIn = myClient.read();
}
background(dataIn);
}
Somebody can help me with this??
Thanks in advance
1