Example base code for Java chat client/server implementation