A TCP and UDP client and server implementation in java