|
|
|
@ -287,12 +287,14 @@ void Server::Wait() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Server::PerformOpsOnCall(CallOpBuffer* buf, Call* call) { |
|
|
|
|
static const size_t MAX_OPS = 8; |
|
|
|
|
size_t nops = MAX_OPS; |
|
|
|
|
grpc_op ops[MAX_OPS]; |
|
|
|
|
buf->FillOps(ops, &nops); |
|
|
|
|
GPR_ASSERT(GRPC_CALL_OK == |
|
|
|
|
grpc_call_start_batch(call->call(), ops, nops, buf)); |
|
|
|
|
if (call->call()) { |
|
|
|
|
static const size_t MAX_OPS = 8; |
|
|
|
|
size_t nops = MAX_OPS; |
|
|
|
|
grpc_op ops[MAX_OPS]; |
|
|
|
|
buf->FillOps(ops, &nops); |
|
|
|
|
GPR_ASSERT(GRPC_CALL_OK == |
|
|
|
|
grpc_call_start_batch(call->call(), ops, nops, buf)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class Server::AsyncRequest GRPC_FINAL : public CompletionQueueTag { |
|
|
|
@ -343,7 +345,9 @@ class Server::AsyncRequest GRPC_FINAL : public CompletionQueueTag { |
|
|
|
|
} |
|
|
|
|
ctx_->call_ = call_; |
|
|
|
|
Call call(call_, server_, cq_); |
|
|
|
|
ctx_->BeginCompletionOp(&call); |
|
|
|
|
if (call_) { |
|
|
|
|
ctx_->BeginCompletionOp(&call); |
|
|
|
|
} |
|
|
|
|
// just the pointers inside call are copied here
|
|
|
|
|
stream_->BindCall(&call); |
|
|
|
|
delete this; |
|
|
|
|