diff --git a/include/grpcpp/impl/codegen/rpc_service_method.h b/include/grpcpp/impl/codegen/rpc_service_method.h index 44d9b8ad634..1890e4254d0 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 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 ebbf64bc6df..ecb9073cf92 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 1e177600924..fcff75a4201 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(