edited March 2017 in Library Questions

Hello everybody, I am using this code but processing says that the function 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*; // 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;

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



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


  • edit post, highlight code, press ctrl-o to format...

  • Please check the reference for examples to accessing data via network. Check the library section >> Network.


  • Answer ✓

    It was a sintaxical problem the good way to do it is Thank you for your help

Sign In or Register to comment.