GRPC C++  1.30.0
Public Member Functions | Friends
grpc_impl::Channel Class Referencefinal

Channels represent a connection to an endpoint. Created by CreateChannel. More...

#include <channel_impl.h>

Public Member Functions

 ~Channel ()
 
grpc_connectivity_state GetState (bool try_to_connect) override
 Get the current channel state. More...
 
grpc::string GetLoadBalancingPolicyName () const
 Returns the LB policy name, or the empty string if not yet available. More...
 
grpc::string GetServiceConfigJSON () const
 Returns the service config in JSON form, or the empty string if not available. More...
 
- Public Member Functions inherited from grpc::ChannelInterface
virtual ~ChannelInterface ()
 
template<typename T >
void NotifyOnStateChange (grpc_connectivity_state last_observed, T deadline, ::grpc_impl::CompletionQueue *cq, void *tag)
 Return the tag on cq when the channel state is changed or deadline expires. More...
 
template<typename T >
bool WaitForStateChange (grpc_connectivity_state last_observed, T deadline)
 Blocking wait for channel state change or deadline expiration. More...
 
template<typename T >
bool WaitForConnected (T deadline)
 Wait for this channel to be connected. More...
 
- Public Member Functions inherited from grpc::internal::CallHook
virtual ~CallHook ()
 
virtual void PerformOpsOnCall (CallOpSetInterface *ops, Call *call)=0
 

Friends

template<class InputMessage , class OutputMessage >
class ::grpc::internal::BlockingUnaryCallImpl
 
class ::grpc::testing::ChannelTestPeer
 
class ::grpc::internal::InterceptedChannel
 
void experimental::ChannelResetConnectionBackoff (Channel *channel)
 
std::shared_ptr< Channelgrpc::CreateChannelInternal (const grpc::string &host, grpc_channel *c_channel, std::vector< std::unique_ptr< ::grpc::experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
 

Detailed Description

Channels represent a connection to an endpoint. Created by CreateChannel.

Constructor & Destructor Documentation

◆ ~Channel()

grpc_impl::Channel::~Channel ( )

Member Function Documentation

◆ GetLoadBalancingPolicyName()

grpc::string grpc_impl::Channel::GetLoadBalancingPolicyName ( ) const

Returns the LB policy name, or the empty string if not yet available.

◆ GetServiceConfigJSON()

grpc::string grpc_impl::Channel::GetServiceConfigJSON ( ) const

Returns the service config in JSON form, or the empty string if not available.

◆ GetState()

grpc_connectivity_state grpc_impl::Channel::GetState ( bool  try_to_connect)
overridevirtual

Get the current channel state.

If the channel is in IDLE and try_to_connect is set to true, try to connect.

Implements grpc::ChannelInterface.

Friends And Related Function Documentation

◆ ::grpc::internal::BlockingUnaryCallImpl

template<class InputMessage , class OutputMessage >
friend class ::grpc::internal::BlockingUnaryCallImpl
friend

◆ ::grpc::internal::InterceptedChannel

friend class ::grpc::internal::InterceptedChannel
friend

◆ ::grpc::testing::ChannelTestPeer

friend class ::grpc::testing::ChannelTestPeer
friend

◆ experimental::ChannelResetConnectionBackoff

◆ grpc::CreateChannelInternal

std::shared_ptr<Channel> grpc::CreateChannelInternal ( const grpc::string host,
grpc_channel c_channel,
std::vector< std::unique_ptr< ::grpc::experimental::ClientInterceptorFactoryInterface >>  interceptor_creators 
)
friend

The documentation for this class was generated from the following file: