Moving connected flag to TCPClientBase to detect errors