Reference+
Name
disconnectEvent()
Description
This function is called when a client disconnects.
Examples
import processing.net.*; Client myClient; int dataIn; void setup() { size(200, 200); myClient = new Client(this, "127.0.0.1", 5204); } void draw() { } // Empty draw keeps the program running // ClientEvent message is generated when a client disconnects. void disconnectEvent(Client someClient) { print("Server Says: "); dataIn = myClient.read(); println(dataIn); background(dataIn); }
Syntax
void disconnectEvent(client) {
statements
}
Parameters
statements
any valid statementsclient
the client that has disconnected
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.