Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

server.read

$
0
0

Hello everybody, I am using this code but processing says that the function server.read is not available. Anybody knows how I can do a server which can read data from a client?

Thank you very much for your help!

// Import the net libraries import processing.net.*; // Declare a client Server server; // The data we will read from the server int data;

void setup() { size(200,200);

server = new Server(this, 5204);

}

void draw() {

// Read data server.read(data);

// The incoming data is used to color the background.

background(data);

}

// The serverEvent function is called whenever a new client connects. void serverEvent(Server server, Client client) { println(" A new client has connected: "+ client.ip()); }


Viewing all articles
Browse latest Browse all 2896

Trending Articles