Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Server check for dead clients while checking for available messages #3097
As discussed in issue #3089 the processing.net.Server only cleans up dead clients when trying to write to them. This patch has the server also check for dead clients while it is looking for available data to read. The check is done in such a way so that a client that has died with unread data can still be read. Additionally, the order of the clients should remain consistent and no client should be skipped. I have included comments explaining the code so that in the future the non-obvious statements can be easily understood.