Merge pull request #20030 from karthikravis/move-method-handler
Make MethodHandler and related interfaces generic
This commit is contained in:
commit
939830aa15
2
BUILD
2
BUILD
|
|
@ -283,6 +283,7 @@ GRPCXX_PUBLIC_HDRS = [
|
|||
"include/grpcpp/support/config.h",
|
||||
"include/grpcpp/support/interceptor.h",
|
||||
"include/grpcpp/support/message_allocator.h",
|
||||
"include/grpcpp/support/method_handler.h",
|
||||
"include/grpcpp/support/proto_buffer_reader.h",
|
||||
"include/grpcpp/support/proto_buffer_writer.h",
|
||||
"include/grpcpp/support/server_callback.h",
|
||||
|
|
@ -2039,6 +2040,7 @@ grpc_cc_library(
|
|||
"include/grpcpp/impl/codegen/interceptor_common.h",
|
||||
"include/grpcpp/impl/codegen/message_allocator.h",
|
||||
"include/grpcpp/impl/codegen/metadata_map.h",
|
||||
"include/grpcpp/impl/codegen/method_handler.h",
|
||||
"include/grpcpp/impl/codegen/method_handler_impl.h",
|
||||
"include/grpcpp/impl/codegen/rpc_method.h",
|
||||
"include/grpcpp/impl/codegen/rpc_service_method.h",
|
||||
|
|
|
|||
1
BUILD.gn
1
BUILD.gn
|
|
@ -1117,6 +1117,7 @@ config("grpc_config") {
|
|||
"include/grpcpp/impl/codegen/interceptor_common.h",
|
||||
"include/grpcpp/impl/codegen/message_allocator.h",
|
||||
"include/grpcpp/impl/codegen/metadata_map.h",
|
||||
"include/grpcpp/impl/codegen/method_handler.h",
|
||||
"include/grpcpp/impl/codegen/method_handler_impl.h",
|
||||
"include/grpcpp/impl/codegen/proto_buffer_reader.h",
|
||||
"include/grpcpp/impl/codegen/proto_buffer_writer.h",
|
||||
|
|
|
|||
|
|
@ -3465,6 +3465,7 @@ foreach(_hdr
|
|||
include/grpcpp/impl/codegen/interceptor_common.h
|
||||
include/grpcpp/impl/codegen/message_allocator.h
|
||||
include/grpcpp/impl/codegen/metadata_map.h
|
||||
include/grpcpp/impl/codegen/method_handler.h
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h
|
||||
include/grpcpp/impl/codegen/rpc_method.h
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h
|
||||
|
|
@ -3978,6 +3979,7 @@ foreach(_hdr
|
|||
include/grpcpp/impl/codegen/interceptor_common.h
|
||||
include/grpcpp/impl/codegen/message_allocator.h
|
||||
include/grpcpp/impl/codegen/metadata_map.h
|
||||
include/grpcpp/impl/codegen/method_handler.h
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h
|
||||
include/grpcpp/impl/codegen/rpc_method.h
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h
|
||||
|
|
@ -4187,6 +4189,7 @@ foreach(_hdr
|
|||
include/grpcpp/impl/codegen/interceptor_common.h
|
||||
include/grpcpp/impl/codegen/message_allocator.h
|
||||
include/grpcpp/impl/codegen/metadata_map.h
|
||||
include/grpcpp/impl/codegen/method_handler.h
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h
|
||||
include/grpcpp/impl/codegen/rpc_method.h
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h
|
||||
|
|
@ -4565,6 +4568,7 @@ foreach(_hdr
|
|||
include/grpcpp/impl/codegen/interceptor_common.h
|
||||
include/grpcpp/impl/codegen/message_allocator.h
|
||||
include/grpcpp/impl/codegen/metadata_map.h
|
||||
include/grpcpp/impl/codegen/method_handler.h
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h
|
||||
include/grpcpp/impl/codegen/rpc_method.h
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -5925,6 +5925,7 @@ PUBLIC_HEADERS_CXX += \
|
|||
include/grpcpp/impl/codegen/interceptor_common.h \
|
||||
include/grpcpp/impl/codegen/message_allocator.h \
|
||||
include/grpcpp/impl/codegen/metadata_map.h \
|
||||
include/grpcpp/impl/codegen/method_handler.h \
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h \
|
||||
include/grpcpp/impl/codegen/rpc_method.h \
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h \
|
||||
|
|
@ -6396,6 +6397,7 @@ PUBLIC_HEADERS_CXX += \
|
|||
include/grpcpp/impl/codegen/interceptor_common.h \
|
||||
include/grpcpp/impl/codegen/message_allocator.h \
|
||||
include/grpcpp/impl/codegen/metadata_map.h \
|
||||
include/grpcpp/impl/codegen/method_handler.h \
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h \
|
||||
include/grpcpp/impl/codegen/rpc_method.h \
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h \
|
||||
|
|
@ -6574,6 +6576,7 @@ PUBLIC_HEADERS_CXX += \
|
|||
include/grpcpp/impl/codegen/interceptor_common.h \
|
||||
include/grpcpp/impl/codegen/message_allocator.h \
|
||||
include/grpcpp/impl/codegen/metadata_map.h \
|
||||
include/grpcpp/impl/codegen/method_handler.h \
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h \
|
||||
include/grpcpp/impl/codegen/rpc_method.h \
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h \
|
||||
|
|
@ -6956,6 +6959,7 @@ PUBLIC_HEADERS_CXX += \
|
|||
include/grpcpp/impl/codegen/interceptor_common.h \
|
||||
include/grpcpp/impl/codegen/message_allocator.h \
|
||||
include/grpcpp/impl/codegen/metadata_map.h \
|
||||
include/grpcpp/impl/codegen/method_handler.h \
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h \
|
||||
include/grpcpp/impl/codegen/rpc_method.h \
|
||||
include/grpcpp/impl/codegen/rpc_service_method.h \
|
||||
|
|
|
|||
|
|
@ -389,6 +389,7 @@ filegroups:
|
|||
- include/grpcpp/impl/codegen/interceptor_common.h
|
||||
- include/grpcpp/impl/codegen/message_allocator.h
|
||||
- include/grpcpp/impl/codegen/metadata_map.h
|
||||
- include/grpcpp/impl/codegen/method_handler.h
|
||||
- include/grpcpp/impl/codegen/method_handler_impl.h
|
||||
- include/grpcpp/impl/codegen/rpc_method.h
|
||||
- include/grpcpp/impl/codegen/rpc_service_method.h
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ Pod::Spec.new do |s|
|
|||
'include/grpcpp/impl/codegen/interceptor_common.h',
|
||||
'include/grpcpp/impl/codegen/message_allocator.h',
|
||||
'include/grpcpp/impl/codegen/metadata_map.h',
|
||||
'include/grpcpp/impl/codegen/method_handler.h',
|
||||
'include/grpcpp/impl/codegen/method_handler_impl.h',
|
||||
'include/grpcpp/impl/codegen/rpc_method.h',
|
||||
'include/grpcpp/impl/codegen/rpc_service_method.h',
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@ template <class RequestType, class ResponseType>
|
|||
class CallbackUnaryHandler;
|
||||
template <class RequestType, class ResponseType>
|
||||
class CallbackServerStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler;
|
||||
template <::grpc::StatusCode code>
|
||||
class ErrorMethodHandler;
|
||||
|
||||
} // namespace internal
|
||||
} // namespace grpc_impl
|
||||
|
|
@ -51,21 +57,10 @@ class CallOpSendMessage;
|
|||
template <class R>
|
||||
class CallOpRecvMessage;
|
||||
class CallOpGenericRecvMessage;
|
||||
class MethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler;
|
||||
template <StatusCode code>
|
||||
class ErrorMethodHandler;
|
||||
class ExternalConnectionAcceptorImpl;
|
||||
template <class R>
|
||||
class DeserializeFuncType;
|
||||
class GrpcByteBufferPeer;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler;
|
||||
|
||||
} // namespace internal
|
||||
/// A sequence of bytes.
|
||||
|
|
@ -175,19 +170,15 @@ class ByteBuffer final {
|
|||
friend class internal::CallOpRecvMessage;
|
||||
friend class internal::CallOpGenericRecvMessage;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class RpcMethodHandler;
|
||||
friend class ::grpc_impl::internal::RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ServerStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class internal::RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class internal::ServerStreamingHandler;
|
||||
friend class ::grpc_impl::internal::ServerStreamingHandler;
|
||||
template <class RequestType, class ResponseType>
|
||||
friend class ::grpc_impl::internal::CallbackUnaryHandler;
|
||||
template <class RequestType, class ResponseType>
|
||||
friend class ::grpc_impl::internal::CallbackServerStreamingHandler;
|
||||
template <StatusCode code>
|
||||
friend class internal::ErrorMethodHandler;
|
||||
friend class ::grpc_impl::internal::ErrorMethodHandler;
|
||||
template <class R>
|
||||
friend class internal::DeserializeFuncType;
|
||||
friend class ProtoBufferReader;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,17 @@ class ServerWriter;
|
|||
namespace internal {
|
||||
template <class W, class R>
|
||||
class ServerReaderWriterBody;
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ClientStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler;
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
class TemplatedBidiStreamingHandler;
|
||||
template <::grpc::StatusCode code>
|
||||
class ErrorMethodHandler;
|
||||
} // namespace internal
|
||||
} // namespace grpc_impl
|
||||
namespace grpc {
|
||||
|
|
@ -70,18 +81,6 @@ class ServerInterface;
|
|||
namespace internal {
|
||||
class CompletionQueueTag;
|
||||
class RpcMethod;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ClientStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class BidiStreamingHandler;
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
class TemplatedBidiStreamingHandler;
|
||||
template <StatusCode code>
|
||||
class ErrorMethodHandler;
|
||||
template <class InputMessage, class OutputMessage>
|
||||
class BlockingUnaryCallImpl;
|
||||
template <class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
|
||||
|
|
@ -266,15 +265,15 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
|
|||
template <class W, class R>
|
||||
friend class ::grpc_impl::internal::ServerReaderWriterBody;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::RpcMethodHandler;
|
||||
friend class ::grpc_impl::internal::RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::ClientStreamingHandler;
|
||||
friend class ::grpc_impl::internal::ClientStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::ServerStreamingHandler;
|
||||
friend class ::grpc_impl::internal::ServerStreamingHandler;
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
friend class ::grpc::internal::TemplatedBidiStreamingHandler;
|
||||
friend class ::grpc_impl::internal::TemplatedBidiStreamingHandler;
|
||||
template <::grpc::StatusCode code>
|
||||
friend class ::grpc::internal::ErrorMethodHandler;
|
||||
friend class ::grpc_impl::internal::ErrorMethodHandler;
|
||||
friend class ::grpc_impl::Server;
|
||||
friend class ::grpc_impl::ServerContext;
|
||||
friend class ::grpc::ServerInterface;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2019 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPCPP_IMPL_CODEGEN_METHOD_HANDLER_H
|
||||
#define GRPCPP_IMPL_CODEGEN_METHOD_HANDLER_H
|
||||
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
|
||||
namespace grpc {
|
||||
|
||||
namespace internal {
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
using BidiStreamingHandler =
|
||||
::grpc_impl::internal::BidiStreamingHandler<ServiceType, RequestType,
|
||||
ResponseType>;
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
using RpcMethodHandler =
|
||||
::grpc_impl::internal::RpcMethodHandler<ServiceType, RequestType,
|
||||
ResponseType>;
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
using ClientStreamingHandler =
|
||||
::grpc_impl::internal::ClientStreamingHandler<ServiceType, RequestType,
|
||||
ResponseType>;
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
using ServerStreamingHandler =
|
||||
::grpc_impl::internal::ServerStreamingHandler<ServiceType, RequestType,
|
||||
ResponseType>;
|
||||
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
using TemplatedBidiStreamingHandler =
|
||||
::grpc_impl::internal::TemplatedBidiStreamingHandler<Streamer, WriteNeeded>;
|
||||
|
||||
template <class RequestType, class ResponseType>
|
||||
using StreamedUnaryHandler =
|
||||
::grpc_impl::internal::StreamedUnaryHandler<RequestType, ResponseType>;
|
||||
|
||||
template <class RequestType, class ResponseType>
|
||||
using SplitServerStreamingHandler =
|
||||
::grpc_impl::internal::SplitServerStreamingHandler<RequestType,
|
||||
ResponseType>;
|
||||
|
||||
template <StatusCode code>
|
||||
using ErrorMethodHandler = ::grpc_impl::internal::ErrorMethodHandler<code>;
|
||||
|
||||
using UnknownMethodHandler = ::grpc_impl::internal::UnknownMethodHandler;
|
||||
|
||||
using ResourceExhaustedHandler =
|
||||
::grpc_impl::internal::ResourceExhaustedHandler;
|
||||
|
||||
} // namespace internal
|
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCPP_IMPL_CODEGEN_METHOD_HANDLER_H
|
||||
|
|
@ -22,9 +22,9 @@
|
|||
#include <grpcpp/impl/codegen/byte_buffer.h>
|
||||
#include <grpcpp/impl/codegen/core_codegen_interface.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream.h>
|
||||
#include <grpcpp/impl/codegen/sync_stream_impl.h>
|
||||
|
||||
namespace grpc {
|
||||
namespace grpc_impl {
|
||||
|
||||
namespace internal {
|
||||
|
||||
|
|
@ -36,12 +36,13 @@ namespace internal {
|
|||
// Additionally, we don't need to return if we caught an exception or not;
|
||||
// the handling is the same in either case.
|
||||
template <class Callable>
|
||||
Status CatchingFunctionHandler(Callable&& handler) {
|
||||
::grpc::Status CatchingFunctionHandler(Callable&& handler) {
|
||||
#if GRPC_ALLOW_EXCEPTIONS
|
||||
try {
|
||||
return handler();
|
||||
} catch (...) {
|
||||
return Status(StatusCode::UNKNOWN, "Unexpected error in RPC handling");
|
||||
return ::grpc::Status(::grpc::StatusCode::UNKNOWN,
|
||||
"Unexpected error in RPC handling");
|
||||
}
|
||||
#else // GRPC_ALLOW_EXCEPTIONS
|
||||
return handler();
|
||||
|
|
@ -50,18 +51,18 @@ Status CatchingFunctionHandler(Callable&& handler) {
|
|||
|
||||
/// A wrapper class of an application provided rpc method handler.
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler : public MethodHandler {
|
||||
class RpcMethodHandler : public ::grpc::internal::MethodHandler {
|
||||
public:
|
||||
RpcMethodHandler(
|
||||
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*, ResponseType*)>
|
||||
std::function<::grpc::Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*, ResponseType*)>
|
||||
func,
|
||||
ServiceType* service)
|
||||
: func_(func), service_(service) {}
|
||||
|
||||
void RunHandler(const HandlerParameter& param) final {
|
||||
ResponseType rsp;
|
||||
Status status = param.status;
|
||||
::grpc::Status status = param.status;
|
||||
if (status.ok()) {
|
||||
status = CatchingFunctionHandler([this, ¶m, &rsp] {
|
||||
return func_(service_, param.server_context,
|
||||
|
|
@ -71,8 +72,9 @@ class RpcMethodHandler : public MethodHandler {
|
|||
}
|
||||
|
||||
GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_);
|
||||
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage,
|
||||
CallOpServerSendStatus>
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
|
||||
::grpc::internal::CallOpSendMessage,
|
||||
::grpc::internal::CallOpServerSendStatus>
|
||||
ops;
|
||||
ops.SendInitialMetadata(¶m.server_context->initial_metadata_,
|
||||
param.server_context->initial_metadata_flags());
|
||||
|
|
@ -87,13 +89,15 @@ class RpcMethodHandler : public MethodHandler {
|
|||
param.call->cq()->Pluck(&ops);
|
||||
}
|
||||
|
||||
void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status,
|
||||
void** /*handler_data*/) final {
|
||||
ByteBuffer buf;
|
||||
void* Deserialize(grpc_call* call, grpc_byte_buffer* req,
|
||||
::grpc::Status* status, void** /*handler_data*/) final {
|
||||
::grpc::ByteBuffer buf;
|
||||
buf.set_buffer(req);
|
||||
auto* request = new (g_core_codegen_interface->grpc_call_arena_alloc(
|
||||
call, sizeof(RequestType))) RequestType();
|
||||
*status = SerializationTraits<RequestType>::Deserialize(&buf, request);
|
||||
auto* request =
|
||||
new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
|
||||
call, sizeof(RequestType))) RequestType();
|
||||
*status =
|
||||
::grpc::SerializationTraits<RequestType>::Deserialize(&buf, request);
|
||||
buf.Release();
|
||||
if (status->ok()) {
|
||||
return request;
|
||||
|
|
@ -104,8 +108,8 @@ class RpcMethodHandler : public MethodHandler {
|
|||
|
||||
private:
|
||||
/// Application provided rpc handler function.
|
||||
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*, ResponseType*)>
|
||||
std::function<::grpc::Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*, ResponseType*)>
|
||||
func_;
|
||||
// The class the above handler function lives in.
|
||||
ServiceType* service_;
|
||||
|
|
@ -113,24 +117,28 @@ class RpcMethodHandler : public MethodHandler {
|
|||
|
||||
/// A wrapper class of an application provided client streaming handler.
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ClientStreamingHandler : public MethodHandler {
|
||||
class ClientStreamingHandler : public ::grpc::internal::MethodHandler {
|
||||
public:
|
||||
ClientStreamingHandler(
|
||||
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
ServerReader<RequestType>*, ResponseType*)>
|
||||
std::function<::grpc::Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
::grpc_impl::ServerReader<RequestType>*,
|
||||
ResponseType*)>
|
||||
func,
|
||||
ServiceType* service)
|
||||
: func_(func), service_(service) {}
|
||||
|
||||
void RunHandler(const HandlerParameter& param) final {
|
||||
ServerReader<RequestType> reader(param.call, param.server_context);
|
||||
::grpc_impl::ServerReader<RequestType> reader(param.call,
|
||||
param.server_context);
|
||||
ResponseType rsp;
|
||||
Status status = CatchingFunctionHandler([this, ¶m, &reader, &rsp] {
|
||||
return func_(service_, param.server_context, &reader, &rsp);
|
||||
});
|
||||
::grpc::Status status =
|
||||
CatchingFunctionHandler([this, ¶m, &reader, &rsp] {
|
||||
return func_(service_, param.server_context, &reader, &rsp);
|
||||
});
|
||||
|
||||
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage,
|
||||
CallOpServerSendStatus>
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
|
||||
::grpc::internal::CallOpSendMessage,
|
||||
::grpc::internal::CallOpServerSendStatus>
|
||||
ops;
|
||||
if (!param.server_context->sent_initial_metadata_) {
|
||||
ops.SendInitialMetadata(¶m.server_context->initial_metadata_,
|
||||
|
|
@ -148,27 +156,30 @@ class ClientStreamingHandler : public MethodHandler {
|
|||
}
|
||||
|
||||
private:
|
||||
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
ServerReader<RequestType>*, ResponseType*)>
|
||||
std::function<::grpc::Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
::grpc_impl::ServerReader<RequestType>*,
|
||||
ResponseType*)>
|
||||
func_;
|
||||
ServiceType* service_;
|
||||
};
|
||||
|
||||
/// A wrapper class of an application provided server streaming handler.
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler : public MethodHandler {
|
||||
class ServerStreamingHandler : public ::grpc::internal::MethodHandler {
|
||||
public:
|
||||
ServerStreamingHandler(
|
||||
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*, ServerWriter<ResponseType>*)>
|
||||
std::function<::grpc::Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*,
|
||||
::grpc_impl::ServerWriter<ResponseType>*)>
|
||||
func,
|
||||
ServiceType* service)
|
||||
: func_(func), service_(service) {}
|
||||
|
||||
void RunHandler(const HandlerParameter& param) final {
|
||||
Status status = param.status;
|
||||
::grpc::Status status = param.status;
|
||||
if (status.ok()) {
|
||||
ServerWriter<ResponseType> writer(param.call, param.server_context);
|
||||
::grpc_impl::ServerWriter<ResponseType> writer(param.call,
|
||||
param.server_context);
|
||||
status = CatchingFunctionHandler([this, ¶m, &writer] {
|
||||
return func_(service_, param.server_context,
|
||||
static_cast<RequestType*>(param.request), &writer);
|
||||
|
|
@ -176,7 +187,9 @@ class ServerStreamingHandler : public MethodHandler {
|
|||
static_cast<RequestType*>(param.request)->~RequestType();
|
||||
}
|
||||
|
||||
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops;
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
|
||||
::grpc::internal::CallOpServerSendStatus>
|
||||
ops;
|
||||
if (!param.server_context->sent_initial_metadata_) {
|
||||
ops.SendInitialMetadata(¶m.server_context->initial_metadata_,
|
||||
param.server_context->initial_metadata_flags());
|
||||
|
|
@ -192,13 +205,15 @@ class ServerStreamingHandler : public MethodHandler {
|
|||
param.call->cq()->Pluck(&ops);
|
||||
}
|
||||
|
||||
void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status,
|
||||
void** /*handler_data*/) final {
|
||||
ByteBuffer buf;
|
||||
void* Deserialize(grpc_call* call, grpc_byte_buffer* req,
|
||||
::grpc::Status* status, void** /*handler_data*/) final {
|
||||
::grpc::ByteBuffer buf;
|
||||
buf.set_buffer(req);
|
||||
auto* request = new (g_core_codegen_interface->grpc_call_arena_alloc(
|
||||
call, sizeof(RequestType))) RequestType();
|
||||
*status = SerializationTraits<RequestType>::Deserialize(&buf, request);
|
||||
auto* request =
|
||||
new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
|
||||
call, sizeof(RequestType))) RequestType();
|
||||
*status =
|
||||
::grpc::SerializationTraits<RequestType>::Deserialize(&buf, request);
|
||||
buf.Release();
|
||||
if (status->ok()) {
|
||||
return request;
|
||||
|
|
@ -208,8 +223,9 @@ class ServerStreamingHandler : public MethodHandler {
|
|||
}
|
||||
|
||||
private:
|
||||
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*, ServerWriter<ResponseType>*)>
|
||||
std::function<::grpc::Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
const RequestType*,
|
||||
::grpc_impl::ServerWriter<ResponseType>*)>
|
||||
func_;
|
||||
ServiceType* service_;
|
||||
};
|
||||
|
|
@ -222,19 +238,22 @@ class ServerStreamingHandler : public MethodHandler {
|
|||
/// Instead, it is expected to be an implicitly-captured argument of func
|
||||
/// (through bind or something along those lines)
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
class TemplatedBidiStreamingHandler : public MethodHandler {
|
||||
class TemplatedBidiStreamingHandler : public ::grpc::internal::MethodHandler {
|
||||
public:
|
||||
TemplatedBidiStreamingHandler(
|
||||
std::function<Status(::grpc_impl::ServerContext*, Streamer*)> func)
|
||||
std::function<::grpc::Status(::grpc_impl::ServerContext*, Streamer*)>
|
||||
func)
|
||||
: func_(func), write_needed_(WriteNeeded) {}
|
||||
|
||||
void RunHandler(const HandlerParameter& param) final {
|
||||
Streamer stream(param.call, param.server_context);
|
||||
Status status = CatchingFunctionHandler([this, ¶m, &stream] {
|
||||
::grpc::Status status = CatchingFunctionHandler([this, ¶m, &stream] {
|
||||
return func_(param.server_context, &stream);
|
||||
});
|
||||
|
||||
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops;
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
|
||||
::grpc::internal::CallOpServerSendStatus>
|
||||
ops;
|
||||
if (!param.server_context->sent_initial_metadata_) {
|
||||
ops.SendInitialMetadata(¶m.server_context->initial_metadata_,
|
||||
param.server_context->initial_metadata_flags());
|
||||
|
|
@ -244,8 +263,8 @@ class TemplatedBidiStreamingHandler : public MethodHandler {
|
|||
if (write_needed_ && status.ok()) {
|
||||
// If we needed a write but never did one, we need to mark the
|
||||
// status as a fail
|
||||
status = Status(StatusCode::INTERNAL,
|
||||
"Service did not provide response message");
|
||||
status = ::grpc::Status(::grpc::StatusCode::INTERNAL,
|
||||
"Service did not provide response message");
|
||||
}
|
||||
}
|
||||
ops.ServerSendStatus(¶m.server_context->trailing_metadata_, status);
|
||||
|
|
@ -257,59 +276,65 @@ class TemplatedBidiStreamingHandler : public MethodHandler {
|
|||
}
|
||||
|
||||
private:
|
||||
std::function<Status(::grpc_impl::ServerContext*, Streamer*)> func_;
|
||||
std::function<::grpc::Status(::grpc_impl::ServerContext*, Streamer*)> func_;
|
||||
const bool write_needed_;
|
||||
};
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class BidiStreamingHandler
|
||||
: public TemplatedBidiStreamingHandler<
|
||||
ServerReaderWriter<ResponseType, RequestType>, false> {
|
||||
::grpc_impl::ServerReaderWriter<ResponseType, RequestType>, false> {
|
||||
public:
|
||||
BidiStreamingHandler(
|
||||
std::function<Status(ServiceType*, ::grpc_impl::ServerContext*,
|
||||
ServerReaderWriter<ResponseType, RequestType>*)>
|
||||
std::function<::grpc::Status(
|
||||
ServiceType*, ::grpc_impl::ServerContext*,
|
||||
::grpc_impl::ServerReaderWriter<ResponseType, RequestType>*)>
|
||||
func,
|
||||
ServiceType* service)
|
||||
: TemplatedBidiStreamingHandler<
|
||||
ServerReaderWriter<ResponseType, RequestType>, false>(std::bind(
|
||||
func, service, std::placeholders::_1, std::placeholders::_2)) {}
|
||||
::grpc_impl::ServerReaderWriter<ResponseType, RequestType>, false>(
|
||||
std::bind(func, service, std::placeholders::_1,
|
||||
std::placeholders::_2)) {}
|
||||
};
|
||||
|
||||
template <class RequestType, class ResponseType>
|
||||
class StreamedUnaryHandler
|
||||
: public TemplatedBidiStreamingHandler<
|
||||
ServerUnaryStreamer<RequestType, ResponseType>, true> {
|
||||
::grpc_impl::ServerUnaryStreamer<RequestType, ResponseType>, true> {
|
||||
public:
|
||||
explicit StreamedUnaryHandler(
|
||||
std::function<Status(::grpc_impl::ServerContext*,
|
||||
ServerUnaryStreamer<RequestType, ResponseType>*)>
|
||||
std::function<::grpc::Status(
|
||||
::grpc_impl::ServerContext*,
|
||||
::grpc_impl::ServerUnaryStreamer<RequestType, ResponseType>*)>
|
||||
func)
|
||||
: TemplatedBidiStreamingHandler<
|
||||
ServerUnaryStreamer<RequestType, ResponseType>, true>(func) {}
|
||||
::grpc_impl::ServerUnaryStreamer<RequestType, ResponseType>, true>(
|
||||
func) {}
|
||||
};
|
||||
|
||||
template <class RequestType, class ResponseType>
|
||||
class SplitServerStreamingHandler
|
||||
: public TemplatedBidiStreamingHandler<
|
||||
ServerSplitStreamer<RequestType, ResponseType>, false> {
|
||||
::grpc_impl::ServerSplitStreamer<RequestType, ResponseType>, false> {
|
||||
public:
|
||||
explicit SplitServerStreamingHandler(
|
||||
std::function<Status(::grpc_impl::ServerContext*,
|
||||
ServerSplitStreamer<RequestType, ResponseType>*)>
|
||||
std::function<::grpc::Status(
|
||||
::grpc_impl::ServerContext*,
|
||||
::grpc_impl::ServerSplitStreamer<RequestType, ResponseType>*)>
|
||||
func)
|
||||
: TemplatedBidiStreamingHandler<
|
||||
ServerSplitStreamer<RequestType, ResponseType>, false>(func) {}
|
||||
::grpc_impl::ServerSplitStreamer<RequestType, ResponseType>, false>(
|
||||
func) {}
|
||||
};
|
||||
|
||||
/// General method handler class for errors that prevent real method use
|
||||
/// e.g., handle unknown method by returning UNIMPLEMENTED error.
|
||||
template <StatusCode code>
|
||||
class ErrorMethodHandler : public MethodHandler {
|
||||
template <::grpc::StatusCode code>
|
||||
class ErrorMethodHandler : public ::grpc::internal::MethodHandler {
|
||||
public:
|
||||
template <class T>
|
||||
static void FillOps(::grpc_impl::ServerContext* context, T* ops) {
|
||||
Status status(code, "");
|
||||
::grpc::Status status(code, "");
|
||||
if (!context->sent_initial_metadata_) {
|
||||
ops->SendInitialMetadata(&context->initial_metadata_,
|
||||
context->initial_metadata_flags());
|
||||
|
|
@ -322,27 +347,30 @@ class ErrorMethodHandler : public MethodHandler {
|
|||
}
|
||||
|
||||
void RunHandler(const HandlerParameter& param) final {
|
||||
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops;
|
||||
::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
|
||||
::grpc::internal::CallOpServerSendStatus>
|
||||
ops;
|
||||
FillOps(param.server_context, &ops);
|
||||
param.call->PerformOps(&ops);
|
||||
param.call->cq()->Pluck(&ops);
|
||||
}
|
||||
|
||||
void* Deserialize(grpc_call* /*call*/, grpc_byte_buffer* req,
|
||||
Status* /*status*/, void** /*handler_data*/) final {
|
||||
::grpc::Status* /*status*/, void** /*handler_data*/) final {
|
||||
// We have to destroy any request payload
|
||||
if (req != nullptr) {
|
||||
g_core_codegen_interface->grpc_byte_buffer_destroy(req);
|
||||
::grpc::g_core_codegen_interface->grpc_byte_buffer_destroy(req);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
typedef ErrorMethodHandler<StatusCode::UNIMPLEMENTED> UnknownMethodHandler;
|
||||
typedef ErrorMethodHandler<StatusCode::RESOURCE_EXHAUSTED>
|
||||
typedef ErrorMethodHandler<::grpc::StatusCode::UNIMPLEMENTED>
|
||||
UnknownMethodHandler;
|
||||
typedef ErrorMethodHandler<::grpc::StatusCode::RESOURCE_EXHAUSTED>
|
||||
ResourceExhaustedHandler;
|
||||
|
||||
} // namespace internal
|
||||
} // namespace grpc
|
||||
} // namespace grpc_impl
|
||||
|
||||
#endif // GRPCPP_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct grpc_auth_property_iterator;
|
|||
namespace grpc {
|
||||
class SecureAuthContext;
|
||||
|
||||
typedef std::pair<grpc::string_ref, grpc::string_ref> AuthProperty;
|
||||
typedef std::pair<string_ref, string_ref> AuthProperty;
|
||||
|
||||
class AuthPropertyIterator
|
||||
: public std::iterator<std::input_iterator_tag, const AuthProperty> {
|
||||
|
|
@ -86,8 +86,8 @@ class AuthContext {
|
|||
|
||||
/// Mutation functions: should only be used by an AuthMetadataProcessor.
|
||||
virtual void AddProperty(const grpc::string& key,
|
||||
const grpc::string_ref& value) = 0;
|
||||
virtual bool SetPeerIdentityPropertyName(const grpc::string& name) = 0;
|
||||
const string_ref& value) = 0;
|
||||
virtual bool SetPeerIdentityPropertyName(const string& name) = 0;
|
||||
};
|
||||
|
||||
} // namespace grpc
|
||||
|
|
|
|||
|
|
@ -68,9 +68,19 @@ template <class RequestType, class ResponseType>
|
|||
class CallbackServerStreamingHandler;
|
||||
template <class RequestType, class ResponseType>
|
||||
class CallbackBidiHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ClientStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler;
|
||||
template <class W, class R>
|
||||
class ServerReaderWriterBody;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler;
|
||||
class ServerReactor;
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
class TemplatedBidiStreamingHandler;
|
||||
template <::grpc::StatusCode code>
|
||||
class ErrorMethodHandler;
|
||||
} // namespace internal
|
||||
|
||||
} // namespace grpc_impl
|
||||
|
|
@ -79,20 +89,9 @@ class GenericServerContext;
|
|||
class ServerInterface;
|
||||
|
||||
namespace internal {
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ClientStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class ServerStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
class RpcMethodHandler;
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
class TemplatedBidiStreamingHandler;
|
||||
template <StatusCode code>
|
||||
class ErrorMethodHandler;
|
||||
class Call;
|
||||
} // namespace internal
|
||||
|
||||
class ServerInterface;
|
||||
namespace testing {
|
||||
class InteropServerContextInspector;
|
||||
class ServerContextTestSpouse;
|
||||
|
|
@ -293,13 +292,13 @@ class ServerContext {
|
|||
template <class W, class R>
|
||||
friend class ::grpc_impl::internal::ServerReaderWriterBody;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::RpcMethodHandler;
|
||||
friend class ::grpc_impl::internal::RpcMethodHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::ClientStreamingHandler;
|
||||
friend class ::grpc_impl::internal::ClientStreamingHandler;
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::ServerStreamingHandler;
|
||||
friend class ::grpc_impl::internal::ServerStreamingHandler;
|
||||
template <class Streamer, bool WriteNeeded>
|
||||
friend class ::grpc::internal::TemplatedBidiStreamingHandler;
|
||||
friend class ::grpc_impl::internal::TemplatedBidiStreamingHandler;
|
||||
template <class RequestType, class ResponseType>
|
||||
friend class ::grpc_impl::internal::CallbackUnaryHandler;
|
||||
template <class RequestType, class ResponseType>
|
||||
|
|
@ -309,7 +308,7 @@ class ServerContext {
|
|||
template <class RequestType, class ResponseType>
|
||||
friend class ::grpc_impl::internal::CallbackBidiHandler;
|
||||
template <::grpc::StatusCode code>
|
||||
friend class ::grpc::internal::ErrorMethodHandler;
|
||||
friend class ::grpc_impl::internal::ErrorMethodHandler;
|
||||
friend class ::grpc_impl::ClientContext;
|
||||
friend class ::grpc::GenericServerContext;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <grpcpp/impl/codegen/call_hook.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue_tag.h>
|
||||
#include <grpcpp/impl/codegen/core_codegen_interface.h>
|
||||
#include <grpcpp/impl/codegen/interceptor_common.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/server_context_impl.h>
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ class ServerAsyncStreamingInterface;
|
|||
|
||||
namespace experimental {
|
||||
class CallbackGenericService;
|
||||
class ServerInterceptorFactoryInterface;
|
||||
} // namespace experimental
|
||||
|
||||
class ServerInterface : public internal::CallHook {
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ class ServerReader final : public ServerReaderInterface<R> {
|
|||
ServerContext* const ctx_;
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::ClientStreamingHandler;
|
||||
friend class ::grpc_impl::internal::ClientStreamingHandler;
|
||||
|
||||
ServerReader(::grpc::internal::Call* call, ::grpc_impl::ServerContext* ctx)
|
||||
: call_(call), ctx_(ctx) {}
|
||||
|
|
@ -688,7 +688,7 @@ class ServerWriter final : public ServerWriterInterface<W> {
|
|||
::grpc_impl::ServerContext* const ctx_;
|
||||
|
||||
template <class ServiceType, class RequestType, class ResponseType>
|
||||
friend class ::grpc::internal::ServerStreamingHandler;
|
||||
friend class ::grpc_impl::internal::ServerStreamingHandler;
|
||||
|
||||
ServerWriter(::grpc::internal::Call* call, ::grpc_impl::ServerContext* ctx)
|
||||
: call_(call), ctx_(ctx) {}
|
||||
|
|
@ -800,7 +800,7 @@ class ServerReaderWriter final : public ServerReaderWriterInterface<W, R> {
|
|||
private:
|
||||
internal::ServerReaderWriterBody<W, R> body_;
|
||||
|
||||
friend class ::grpc::internal::TemplatedBidiStreamingHandler<
|
||||
friend class ::grpc_impl::internal::TemplatedBidiStreamingHandler<
|
||||
ServerReaderWriter<W, R>, false>;
|
||||
ServerReaderWriter(::grpc::internal::Call* call,
|
||||
::grpc_impl::ServerContext* ctx)
|
||||
|
|
@ -870,7 +870,7 @@ class ServerUnaryStreamer final
|
|||
bool read_done_;
|
||||
bool write_done_;
|
||||
|
||||
friend class ::grpc::internal::TemplatedBidiStreamingHandler<
|
||||
friend class ::grpc_impl::internal::TemplatedBidiStreamingHandler<
|
||||
ServerUnaryStreamer<RequestType, ResponseType>, true>;
|
||||
ServerUnaryStreamer(::grpc::internal::Call* call,
|
||||
::grpc_impl::ServerContext* ctx)
|
||||
|
|
@ -932,7 +932,7 @@ class ServerSplitStreamer final
|
|||
internal::ServerReaderWriterBody<ResponseType, RequestType> body_;
|
||||
bool read_done_;
|
||||
|
||||
friend class ::grpc::internal::TemplatedBidiStreamingHandler<
|
||||
friend class ::grpc_impl::internal::TemplatedBidiStreamingHandler<
|
||||
ServerSplitStreamer<RequestType, ResponseType>, false>;
|
||||
ServerSplitStreamer(::grpc::internal::Call* call,
|
||||
::grpc_impl::ServerContext* ctx)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2015 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPCPP_SUPPORT_METHOD_HANDLER_H
|
||||
#define GRPCPP_SUPPORT_METHOD_HANDLER_H
|
||||
|
||||
#include <grpcpp/impl/codegen/method_handler.h>
|
||||
|
||||
#endif // GRPCPP_SUPPORT_METHOD_HANDLER_H
|
||||
|
|
@ -144,7 +144,7 @@ grpc::string GetHeaderIncludes(grpc_generator::File* file,
|
|||
"grpcpp/impl/codegen/client_callback.h",
|
||||
"grpcpp/impl/codegen/client_context.h",
|
||||
"grpcpp/impl/codegen/completion_queue.h",
|
||||
"grpcpp/impl/codegen/method_handler_impl.h",
|
||||
"grpcpp/impl/codegen/method_handler.h",
|
||||
"grpcpp/impl/codegen/proto_utils.h",
|
||||
"grpcpp/impl/codegen/rpc_method.h",
|
||||
"grpcpp/impl/codegen/server_callback.h",
|
||||
|
|
@ -1662,7 +1662,7 @@ grpc::string GetSourceIncludes(grpc_generator::File* file,
|
|||
"grpcpp/impl/codegen/channel_interface.h",
|
||||
"grpcpp/impl/codegen/client_unary_call.h",
|
||||
"grpcpp/impl/codegen/client_callback.h",
|
||||
"grpcpp/impl/codegen/method_handler_impl.h",
|
||||
"grpcpp/impl/codegen/method_handler.h",
|
||||
"grpcpp/impl/codegen/rpc_service_method.h",
|
||||
"grpcpp/impl/codegen/server_callback.h",
|
||||
"grpcpp/impl/codegen/service_type.h",
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@
|
|||
#include <grpcpp/impl/codegen/byte_buffer.h>
|
||||
#include <grpcpp/impl/codegen/call.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue_tag.h>
|
||||
#include <grpcpp/impl/codegen/method_handler.h>
|
||||
#include <grpcpp/impl/codegen/server_interceptor.h>
|
||||
#include <grpcpp/impl/grpc_library.h>
|
||||
#include <grpcpp/impl/method_handler_impl.h>
|
||||
#include <grpcpp/impl/rpc_service_method.h>
|
||||
#include <grpcpp/impl/server_initializer.h>
|
||||
#include <grpcpp/impl/service_type.h>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include <grpcpp/impl/codegen/client_callback.h>
|
||||
#include <grpcpp/impl/codegen/client_context.h>
|
||||
#include <grpcpp/impl/codegen/completion_queue.h>
|
||||
#include <grpcpp/impl/codegen/method_handler_impl.h>
|
||||
#include <grpcpp/impl/codegen/method_handler.h>
|
||||
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||
#include <grpcpp/impl/codegen/rpc_method.h>
|
||||
#include <grpcpp/impl/codegen/server_callback.h>
|
||||
|
|
|
|||
|
|
@ -979,6 +979,7 @@ include/grpcpp/impl/codegen/interceptor.h \
|
|||
include/grpcpp/impl/codegen/interceptor_common.h \
|
||||
include/grpcpp/impl/codegen/message_allocator.h \
|
||||
include/grpcpp/impl/codegen/metadata_map.h \
|
||||
include/grpcpp/impl/codegen/method_handler.h \
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h \
|
||||
include/grpcpp/impl/codegen/proto_buffer_reader.h \
|
||||
include/grpcpp/impl/codegen/proto_buffer_writer.h \
|
||||
|
|
|
|||
|
|
@ -981,6 +981,7 @@ include/grpcpp/impl/codegen/interceptor.h \
|
|||
include/grpcpp/impl/codegen/interceptor_common.h \
|
||||
include/grpcpp/impl/codegen/message_allocator.h \
|
||||
include/grpcpp/impl/codegen/metadata_map.h \
|
||||
include/grpcpp/impl/codegen/method_handler.h \
|
||||
include/grpcpp/impl/codegen/method_handler_impl.h \
|
||||
include/grpcpp/impl/codegen/proto_buffer_reader.h \
|
||||
include/grpcpp/impl/codegen/proto_buffer_writer.h \
|
||||
|
|
|
|||
Loading…
Reference in New Issue