1 Star 1 Fork 6

满天星/grpc-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
hello.grpc.pb.cc 3.56 KB
一键复制 编辑 原始数据 按行查看 历史
mantianrong 提交于 2022-12-23 17:05 . init
// 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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/evilskyman/grpc-demo.git
[email protected]:evilskyman/grpc-demo.git
evilskyman
grpc-demo
grpc-demo
master

搜索帮助