Add disconnectEvent() to Server #2133

Closed
ertdfgcvb opened this Issue Oct 12, 2013 · 3 comments

Comments

Projects
None yet
3 participants
@ertdfgcvb

It would be very useful if disconnectEvent(Client c) would also be called in the application running the server.

// Server app
import processing.net.*;

void setup() {
  Server server = new Server(this, 11000); 
}

void draw() {
}

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

//Never called on the "server side":
void disconnectEvent(Client c) {    
  println("Server side: a client disconnected: " + c);
}

// Client app
import processing.net.*; 

void setup() {  
  Client c = new Client(this, "localhost", 11000); 
} 

void draw() { 
} 

void disconnectEvent(Client c) {  
  println("Client side: a client disconnected: " + c);
}
@kfeuz

This comment has been minimized.

Show comment
Hide comment
@kfeuz

kfeuz Apr 18, 2014

Contributor

I have implemented this enhancement and submitted a pull request.

@ertdfgcvb I tested it for several different scenarios but if you want to verify this feature meets your use case as well that would be great.

Contributor

kfeuz commented Apr 18, 2014

I have implemented this enhancement and submitted a pull request.

@ertdfgcvb I tested it for several different scenarios but if you want to verify this feature meets your use case as well that would be great.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 19, 2014

Member

Incorporated for the next release (after 2.1.2).

Member

benfry commented Apr 19, 2014

Incorporated for the next release (after 2.1.2).

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 13, 2015

Member

Apparently fixed but never closed.

Member

benfry commented Aug 13, 2015

Apparently fixed but never closed.

@benfry benfry closed this Aug 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment