Now behaves better when connections closed or socket closed by server
and also hangs for only 4 seconds if you try to connect to a wrong IP address (thanks to an article by David Reilly for the TimedSocket class) http://www.javaworld.com/jw-09-1999/jw-09-timeout.html
New messages for closed connections, trying to send without a connection, etc, rather than just crytic java errors in the Max window – so now you can act on those events in your patch.
As usual, put all files in your Cycling ’74/java/classes folder and type "mxj tcpClient" in a new object box. Supports attributes in object box: @address and @port.