Adding client TCP logic