FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Back  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

serverEvent()

   
Examples  
// Example by Tom Igoe 
// Creates a server that prints new client's IP addresses. 
 
import processing.net.*; 
 
int port = 10002;   
Server myServer;    
 
void setup() 
{ 
  size(400, 400); 
  background(0); 
  myServer = new Server(this, port); // Starts a server on port 10002 
} 
 
void draw() { 
  // Nothing happens here, everything happens inside ServerEvent() 
} 
 
// ServerEvent message is generated when a new client connects 
// to an existing server. 
void serverEvent(Server someServer, Client someClient) { 
  println("We have a new client: " + someClient.ip()); 
} 
 

Description   Coming soon...
   
Syntax  
void serverEvent(client, server) {
  statements
}
   
Parameters  
client   Client

server   Server

statements   any valid statements

   
Usage   Web & Application
   
Related   Server
 
 






   
 
Updated: Fri Jul 15 16:41:09 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info  
ts rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> -->     Processing is an open project initiated by Ben Fry and Casey Reas     © Info   nt> and Casey Reas     © Info   ource.org/cc/Notice" /> -->     Processing is an open project initiated by Ben Fry and Casey Reas     © Info   native file format.