This method blocks forever handling requests from the completion queue.
| 76 | |
| 77 | // This method blocks forever handling requests from the completion queue. |
| 78 | void GrpcVerbsService::HandleRPCsLoop() { |
| 79 | for (int i = 0; i < 10; ++i) { |
| 80 | ENQUEUE_REQUEST(GetRemoteAddress, false); |
| 81 | } |
| 82 | |
| 83 | void* tag; |
| 84 | bool ok; |
| 85 | |
| 86 | while (cq_->Next(&tag, &ok)) { |
| 87 | UntypedCall<GrpcVerbsService>::Tag* callback_tag = |
| 88 | static_cast<UntypedCall<GrpcVerbsService>::Tag*>(tag); |
| 89 | if (callback_tag) { |
| 90 | callback_tag->OnCompleted(this, ok); |
| 91 | } else { |
| 92 | cq_->Shutdown(); |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | void GrpcVerbsService::GetRemoteAddressHandler( |
| 98 | WorkerCall<GetRemoteAddressRequest, GetRemoteAddressResponse>* call) { |
no test coverage detected