I visited the Processing gitHub client page and found out how to easily see if the server is available.
client.output != null
Processing receives an outputStream from a socket, but the object can be null.
Thanks anyway