TCPClient refactored