Networking slide protocol in java