Building a TCP client