34 #ifndef GRPCXX_COMPLETION_QUEUE_H
35 #define GRPCXX_COMPLETION_QUEUE_H
37 #include <grpc/support/time.h>
42 struct grpc_completion_queue;
50 template <
class R,
class W>
51 class ClientReaderWriter;
56 template <
class R,
class W>
58 template <
class ServiceType,
class RequestType,
class ResponseType>
60 template <
class ServiceType,
class RequestType,
class ResponseType>
62 template <
class ServiceType,
class RequestType,
class ResponseType>
64 template <
class ServiceType,
class RequestType,
class ResponseType>
101 return AsyncNextInternal(tag, ok, deadline_tp.
raw_time());
107 bool Next(
void** tag,
bool* ok) {
108 return (AsyncNextInternal(tag, ok, gpr_inf_future(GPR_CLOCK_REALTIME)) !=
116 grpc_completion_queue*
cq() {
return cq_; }
122 friend class ::grpc::ClientReader;
124 friend class ::grpc::ClientWriter;
125 template <
class R,
class W>
126 friend class ::grpc::ClientReaderWriter;
128 friend class ::grpc::ServerReader;
130 friend class ::grpc::ServerWriter;
131 template <
class R,
class W>
132 friend class ::grpc::ServerReaderWriter;
133 template <
class ServiceType,
class RequestType,
class ResponseType>
135 template <
class ServiceType,
class RequestType,
class ResponseType>
137 template <
class ServiceType,
class RequestType,
class ResponseType>
139 template <
class ServiceType,
class RequestType,
class ResponseType>
141 friend class ::grpc::Server;
142 friend class ::grpc::ServerContext;
143 template <
class InputMessage,
class OutputMessage>
147 const InputMessage& request,
148 OutputMessage* result);
150 NextStatus AsyncNextInternal(
void** tag,
bool* ok, gpr_timespec deadline);
159 grpc_completion_queue* cq_;
170 #endif // GRPCXX_COMPLETION_QUEUE_H
Definition: completion_queue.h:75
friend Status BlockingUnaryCall(ChannelInterface *channel, const RpcMethod &method, ClientContext *context, const InputMessage &request, OutputMessage *result)
Definition: client_unary_call.h:51
virtual bool FinalizeResult(void **tag, bool *status)=0
Definition: completion_queue.h:94
Definition: completion_queue.h:94
gpr_timespec raw_time()
Definition: time.h:56
grpc_completion_queue * cq()
Definition: completion_queue.h:116
Definition: client_context.h:74
Definition: completion_queue.h:53
~CompletionQueue() GRPC_OVERRIDE
Definition: completion_queue.cc:47
bool Next(void **tag, bool *ok)
Definition: completion_queue.h:107
Definition: grpc_library.h:41
NextStatus AsyncNext(void **tag, bool *ok, const T &deadline)
Definition: completion_queue.h:99
virtual ~CompletionQueueTag()
Definition: completion_queue.h:77
Definition: completion_queue.h:59
void Shutdown()
Definition: completion_queue.cc:49
Definition: channel_interface.h:52
NextStatus
Definition: completion_queue.h:94
CompletionQueue()
Definition: completion_queue.cc:43
Definition: server_context.h:86
Definition: completion_queue.h:55
Definition: completion_queue.h:87
Definition: completion_queue.h:61
Definition: rpc_method.h:39
Definition: completion_queue.h:57
Definition: completion_queue.h:63
Definition: completion_queue.h:162
#define GRPC_OVERRIDE
Definition: config.h:77
Definition: completion_queue.h:65
Definition: server_builder.h:54
Definition: completion_queue.h:94