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.
IndexSuggestions & BugsWebsite,  Documentation,  Book Bugs › Conflicting Syntax in Net Library
Page Index Toggle Pages: 1
Conflicting Syntax in Net Library (Read 1178 times)
Conflicting Syntax in Net Library
Mar 3rd, 2009, 2:23am
 
http://processing.org/reference/libraries/net/serverEvent_.html

The examples sections uses this code:

void serverEvent(Server someServer, Client someClient) {
 println("We have a new client: " + someClient.ip());
}

But then the syntax section lists it as:

void serverEvent(client, server) {
 statements
}

So which is it?
Client then server, or server then client?
One of them has to be wrong...
Re: Conflicting Syntax in Net Library
Reply #1 - Mar 21st, 2009, 6:07pm
 
Yes, it's like this:

void serverEvent(server, client) {
 statements
}

It's now fixed in the reference.

Casey
Page Index Toggle Pages: 1