diff options
author | Craig Tiller <ctiller@google.com> | 2017-09-22 07:21:12 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-09-22 07:21:12 -0700 |
commit | cfb2da44451348cb8468f95e6eea1b8febd4c527 (patch) | |
tree | 0c83ac60391cd804b4bbb97d84c22fcd299af388 /include/grpc++/impl/codegen/rpc_service_method.h | |
parent | 6bfb8589ad1f814a2d167db1cf0084e4b935ea45 (diff) | |
parent | aa2bc7676c9a3ce0b6634faeb6b360eed9e4a5cc (diff) |
Merge github.com:grpc/grpc into flowctl+millis
Diffstat (limited to 'include/grpc++/impl/codegen/rpc_service_method.h')
-rw-r--r-- | include/grpc++/impl/codegen/rpc_service_method.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/grpc++/impl/codegen/rpc_service_method.h b/include/grpc++/impl/codegen/rpc_service_method.h index 7165774172..d356012ad6 100644 --- a/include/grpc++/impl/codegen/rpc_service_method.h +++ b/include/grpc++/impl/codegen/rpc_service_method.h @@ -25,14 +25,11 @@ #include <memory> #include <vector> +#include <grpc++/impl/codegen/byte_buffer.h> #include <grpc++/impl/codegen/config.h> #include <grpc++/impl/codegen/rpc_method.h> #include <grpc++/impl/codegen/status.h> -extern "C" { -struct grpc_byte_buffer; -} - namespace grpc { class ServerContext; class StreamContextInterface; @@ -43,11 +40,14 @@ class MethodHandler { virtual ~MethodHandler() {} struct HandlerParameter { HandlerParameter(Call* c, ServerContext* context, grpc_byte_buffer* req) - : call(c), server_context(context), request(req) {} + : call(c), server_context(context) { + request.set_buffer(req); + } + ~HandlerParameter() { request.Release(); } Call* call; ServerContext* server_context; - // Handler required to grpc_byte_buffer_destroy this - grpc_byte_buffer* request; + // Handler required to destroy these contents + ByteBuffer request; }; virtual void RunHandler(const HandlerParameter& param) = 0; }; |