|
|
@ -112,8 +112,8 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
static Status ClientPull(ServerContext* context, |
|
|
|
template <class R> |
|
|
|
ReaderInterface<SimpleRequest>* stream, |
|
|
|
static Status ClientPull(ServerContext* context, R* stream, |
|
|
|
SimpleResponse* response) { |
|
|
|
SimpleResponse* response) { |
|
|
|
SimpleRequest request; |
|
|
|
SimpleRequest request; |
|
|
|
while (stream->Read(&request)) { |
|
|
|
while (stream->Read(&request)) { |
|
|
@ -126,8 +126,8 @@ class BenchmarkServiceImpl final : public BenchmarkService::Service { |
|
|
|
} |
|
|
|
} |
|
|
|
return Status::OK; |
|
|
|
return Status::OK; |
|
|
|
} |
|
|
|
} |
|
|
|
static Status ServerPush(ServerContext* context, |
|
|
|
template <class W> |
|
|
|
WriterInterface<SimpleResponse>* stream, |
|
|
|
static Status ServerPush(ServerContext* context, W* stream, |
|
|
|
const SimpleResponse& response, |
|
|
|
const SimpleResponse& response, |
|
|
|
std::function<bool()> done) { |
|
|
|
std::function<bool()> done) { |
|
|
|
while ((done == nullptr) || !done()) { |
|
|
|
while ((done == nullptr) || !done()) { |
|
|
|