Refactored TCPClient.