Simple Java TCP and UDP socket application