34 #ifndef GRPCXX_IMPL_CODEGEN_CHANNEL_INTERFACE_H
35 #define GRPCXX_IMPL_CODEGEN_CHANNEL_INTERFACE_H
39 #include <grpc/impl/codegen/connectivity_state.h>
45 class CallOpSetInterface;
46 class CompletionQueue;
52 template <
class W,
class R>
58 template <
class W,
class R>
69 virtual grpc_connectivity_state
GetState(
bool try_to_connect) = 0;
77 NotifyOnStateChangeImpl(last_observed, deadline_tp.
raw_time(), cq, tag);
85 return WaitForStateChangeImpl(last_observed, deadline_tp.
raw_time());
90 friend class ::grpc::ClientReader;
92 friend class ::grpc::ClientWriter;
93 template <
class W,
class R>
94 friend class ::grpc::ClientReaderWriter;
96 friend class ::grpc::ClientAsyncReader;
98 friend class ::grpc::ClientAsyncWriter;
99 template <
class W,
class R>
100 friend class ::grpc::ClientAsyncReaderWriter;
102 friend class ::grpc::ClientAsyncResponseReader;
103 template <
class InputMessage,
class OutputMessage>
107 const InputMessage& request,
108 OutputMessage* result);
109 friend class ::grpc::RpcMethod;
113 virtual void* RegisterMethod(
const char* method) = 0;
114 virtual void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
115 gpr_timespec deadline,
117 virtual bool WaitForStateChangeImpl(grpc_connectivity_state last_observed,
118 gpr_timespec deadline) = 0;
123 #endif // GRPCXX_IMPL_CODEGEN_CHANNEL_INTERFACE_H
Definition: async_stream.h:233
Definition: channel_interface.h:49
An abstract collection of call ops, used to generate the grpc_call_op structure to pass down to the l...
Definition: call.h:494
void NotifyOnStateChange(grpc_connectivity_state last_observed, T deadline, CompletionQueue *cq, void *tag)
Return the tag on cq when the channel state is changed or deadline expires.
Definition: channel_interface.h:74
virtual grpc_connectivity_state GetState(bool try_to_connect)=0
Get the current channel state.
gpr_timespec raw_time()
Definition: time.h:57
Definition: async_unary_call.h:58
Definition: client_context.h:152
friend Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, ClientContext *context, const InputMessage &request, OutputMessage *result)
Definition: client_unary_call.h:51
Codegen interface for grpc::Channel.
Definition: channel_interface.h:64
Definition: async_stream.h:165
A thin wrapper around grpc_completion_queue (see / src/core/surface/completion_queue.h).
Definition: completion_queue.h:81
Definition: rpc_method.h:43
virtual ~ChannelInterface()
Definition: channel_interface.h:66
bool WaitForStateChange(grpc_connectivity_state last_observed, T deadline)
Blocking wait for channel state change or deadline expiration.
Definition: channel_interface.h:83
Did it work? If it didn't, why?
Definition: status.h:45
Definition: channel_interface.h:53
Definition: async_stream.h:101
Definition: channel_interface.h:51