Added TCP support to client and created test for it.