We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › server/client read/write int/str
Page Index Toggle Pages: 1
server/client read/write int/str (Read 354 times)
server/client read/write int/str
Mar 16th, 2007, 8:00pm
 
hi there,

wondering how to keep variables in tact when sending from client:

 int clicks;
 myClient = new Client(this, "192.168.1.1", 3l337);
 myClient.write(clicks + "\n;");
 clicks++;

because when i receive to the server:

 String holdtext;
 int num_bugs;
 if (thisClient.available() > 0) {
 holdtext = thisClient.readString();
 num_bugs = int(holdtext);
 }

i'm not getting a nice 1,2,3,4,5... debug from the client. is there a way to keep the original var intact to pass to the server side? maybe a global var?

thanks in advance.





Page Index Toggle Pages: 1