Chat program in java to learn TCP/UDP