title: gRPC (cpp) - How can I check if the RPC channel connected successfully?
body: <p>How can I check if the RPC client actually made a successfull connection to the RPC server when I create the channel and stub?</p>
  <p>I want to be able to throw an exception or signal if the connection failed. I am not sure what method qualifies as an &quot;operation&quot; to try here. I don't want to make any of the RPC calls that we defined, as they all have effects that will occur....unless the only option is to go implement some &quot;Hi I am here&quot; RPC method, but that seems silly, no?</p>
  <pre><code>void ChatSyncClient::connect(QUrl const&amp; endpoint)
  {
      disconnect();
  
      // TODO - How do we tell if this fails?
      //        The comments say a lame channel will be returned, where all operations fail
      //        How are we suppose to check right here rather than later?
      auto channel = ::grpc::CreateChannel(endpoint.toString().toStdString(), ::grpc::InsecureChannelCredentials());
      m_stub = std::make_unique&lt;chat_sync::Chat::Stub&gt;(channel);
  
      emit signalOnConnected();
  }
  </code></pre>