Adds utility class for TCP + bug fix in previous version

The code for sending via UDP from previous version is removed.
It needs to be implmen ted using AsyncTask.