Address reviewer comments

pull/16988/head
Vijay Pai 6 years ago
parent 47d0d5bf1f
commit b460622c2d
  1. 10
      include/grpcpp/impl/codegen/rpc_service_method.h
  2. 1
      include/grpcpp/impl/codegen/server_context.h
  3. 4
      src/compiler/cpp_generator.cc

@ -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:

@ -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; }

@ -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(

Loading…
Cancel
Save