aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-10-30 12:35:56 -0700
committerGravatar Vijay Pai <vpai@google.com>2018-10-30 12:35:56 -0700
commitb460622c2d8be2bddcb60cf0682d1b88d9c2357e (patch)
tree8a0f250461784a58e8847a68b8fedb6ceb7799a0
parent47d0d5bf1f163e9dc03a771156aa712dc0716d2b (diff)
Address reviewer comments
-rw-r--r--include/grpcpp/impl/codegen/rpc_service_method.h10
-rw-r--r--include/grpcpp/impl/codegen/server_context.h1
-rw-r--r--src/compiler/cpp_generator.cc4
3 files changed, 12 insertions, 3 deletions
diff --git a/include/grpcpp/impl/codegen/rpc_service_method.h b/include/grpcpp/impl/codegen/rpc_service_method.h
index 44d9b8ad63..1890e4254d 100644
--- a/include/grpcpp/impl/codegen/rpc_service_method.h
+++ b/include/grpcpp/impl/codegen/rpc_service_method.h
@@ -40,6 +40,14 @@ class MethodHandler {
public:
virtual ~MethodHandler() {}
struct HandlerParameter {
+ /// Constructor for HandlerParameter
+ ///
+ /// \param c : the gRPC Call structure for this server call
+ /// \param context : the ServerContext structure for this server call
+ /// \param req : the request payload, if appropriate for this RPC
+ /// \param req_status : the request status after any interceptors have run
+ /// \param renew : used only by the callback API. It is a function
+ /// called by the RPC Controller to request another RPC
HandlerParameter(Call* c, ServerContext* context, void* req,
Status req_status, std::function<void()> renew)
: call(c),
@@ -120,7 +128,7 @@ class RpcServiceMethod : public RpcMethod {
const char* TypeToString(RpcServiceMethod::ApiType type) {
switch (type) {
case ApiType::SYNC:
- return "unset";
+ return "sync";
case ApiType::ASYNC:
return "async";
case ApiType::RAW:
diff --git a/include/grpcpp/impl/codegen/server_context.h b/include/grpcpp/impl/codegen/server_context.h
index ebbf64bc6d..ecb9073cf9 100644
--- a/include/grpcpp/impl/codegen/server_context.h
+++ b/include/grpcpp/impl/codegen/server_context.h
@@ -292,6 +292,7 @@ class ServerContext {
void BindDeadlineAndMetadata(gpr_timespec deadline, grpc_metadata_array* arr);
void Clear();
+
void Setup(gpr_timespec deadline);
uint32_t initial_metadata_flags() const { return 0; }
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index 1e17760092..fcff75a420 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -701,7 +701,7 @@ void PrintHeaderServerMethodSync(grpc_generator::Printer* printer,
printer->Print(method->GetTrailingComments("//").c_str());
}
-// Helper generator. Disabled the sync API for Request and Response, then adds
+// Helper generator. Disables the sync API for Request and Response, then adds
// in an async API for RealRequest and RealResponse types. This is to be used
// to generate async and raw async APIs.
void PrintHeaderServerAsyncMethodsHelper(
@@ -830,7 +830,7 @@ void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer,
printer->Print(*vars, "};\n");
}
-// Helper generator. Disabled the sync API for Request and Response, then adds
+// Helper generator. Disables the sync API for Request and Response, then adds
// in a callback API for RealRequest and RealResponse types. This is to be used
// to generate callback and raw callback APIs.
void PrintHeaderServerCallbackMethodsHelper(