Socket programming TCP and UDP client-server in JAVA