代码拉取完成,页面将自动刷新
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: hello.proto
#include "hello.pb.h"
#include "hello.grpc.pb.h"
#include <functional>
#include <grpcpp/impl/codegen/async_stream.h>
#include <grpcpp/impl/codegen/async_unary_call.h>
#include <grpcpp/impl/codegen/channel_interface.h>
#include <grpcpp/impl/codegen/client_unary_call.h>
#include <grpcpp/impl/codegen/client_callback.h>
#include <grpcpp/impl/codegen/message_allocator.h>
#include <grpcpp/impl/codegen/method_handler.h>
#include <grpcpp/impl/codegen/rpc_service_method.h>
#include <grpcpp/impl/codegen/server_callback.h>
#include <grpcpp/impl/codegen/server_callback_handlers.h>
#include <grpcpp/impl/codegen/server_context.h>
#include <grpcpp/impl/codegen/service_type.h>
#include <grpcpp/impl/codegen/sync_stream.h>
namespace hello {
static const char* HelloService_method_names[] = {
"/hello.HelloService/hello",
};
std::unique_ptr< HelloService::Stub> HelloService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
(void)options;
std::unique_ptr< HelloService::Stub> stub(new HelloService::Stub(channel, options));
return stub;
}
HelloService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options)
: channel_(channel), rpcmethod_hello_(HelloService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::BIDI_STREAMING, channel)
{}
::grpc::ClientReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* HelloService::Stub::helloRaw(::grpc::ClientContext* context) {
return ::grpc::internal::ClientReaderWriterFactory< ::hello::HelloMsg, ::hello::HelloMsg>::Create(channel_.get(), rpcmethod_hello_, context);
}
void HelloService::Stub::async::hello(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::hello::HelloMsg,::hello::HelloMsg>* reactor) {
::grpc::internal::ClientCallbackReaderWriterFactory< ::hello::HelloMsg,::hello::HelloMsg>::Create(stub_->channel_.get(), stub_->rpcmethod_hello_, context, reactor);
}
::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* HelloService::Stub::AsynchelloRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
return ::grpc::internal::ClientAsyncReaderWriterFactory< ::hello::HelloMsg, ::hello::HelloMsg>::Create(channel_.get(), cq, rpcmethod_hello_, context, true, tag);
}
::grpc::ClientAsyncReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* HelloService::Stub::PrepareAsynchelloRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
return ::grpc::internal::ClientAsyncReaderWriterFactory< ::hello::HelloMsg, ::hello::HelloMsg>::Create(channel_.get(), cq, rpcmethod_hello_, context, false, nullptr);
}
HelloService::Service::Service() {
AddMethod(new ::grpc::internal::RpcServiceMethod(
HelloService_method_names[0],
::grpc::internal::RpcMethod::BIDI_STREAMING,
new ::grpc::internal::BidiStreamingHandler< HelloService::Service, ::hello::HelloMsg, ::hello::HelloMsg>(
[](HelloService::Service* service,
::grpc::ServerContext* ctx,
::grpc::ServerReaderWriter<::hello::HelloMsg,
::hello::HelloMsg>* stream) {
return service->hello(ctx, stream);
}, this)));
}
HelloService::Service::~Service() {
}
::grpc::Status HelloService::Service::hello(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::hello::HelloMsg, ::hello::HelloMsg>* stream) {
(void) context;
(void) stream;
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
} // namespace hello
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。