GRPC错误代码12客户端服务器应用程序C++;[调试] 我需要用GRPC创建一个C++的客户机-服务器应用程序。我参考了以下内容和gRPC上的,以创建一个客户端-服务器应用程序,它看起来非常类似于存储库中的helloworld示例(gRPC/examples/cpp/helloworld/)。但是,当我运行服务器端(manager.cc)时,我会收到一条消息说错误代码12:RPC失败。请告诉我哪里出了问题:

GRPC错误代码12客户端服务器应用程序C++;[调试] 我需要用GRPC创建一个C++的客户机-服务器应用程序。我参考了以下内容和gRPC上的,以创建一个客户端-服务器应用程序,它看起来非常类似于存储库中的helloworld示例(gRPC/examples/cpp/helloworld/)。但是,当我运行服务器端(manager.cc)时,我会收到一条消息说错误代码12:RPC失败。请告诉我哪里出了问题:,c++,client-server,rpc,grpc,C++,Client Server,Rpc,Grpc,manager.cc(类似于greeter_server.cc): 是否可以使用以下选项打开跟踪: export GRPC_TRACE=api,call_error export GRPC_VERBOSITY=debug 是否可以使用以下选项打开跟踪: export GRPC_TRACE=api,call_error export GRPC_VERBOSITY=debug 您对joinCM的定义中缺少常量 Status joinCM(ServerContext*context,joinreq

manager.cc(类似于greeter_server.cc):


是否可以使用以下选项打开跟踪:

export GRPC_TRACE=api,call_error
export GRPC_VERBOSITY=debug

是否可以使用以下选项打开跟踪:

export GRPC_TRACE=api,call_error
export GRPC_VERBOSITY=debug

您对joinCM的定义中缺少常量

Status joinCM(ServerContext*context,joinrequest*request,serverresponse*reply\u CM)

应该是

Status joinCM(ServerContext*context,const joinrequest*request,serverresponse*reply\u CM)

相反编译器通过“隐藏重载的虚拟函数”警告指出这一点:)

您的joinCM定义中缺少常量

Status joinCM(ServerContext*context,joinrequest*request,serverresponse*reply\u CM)

应该是

Status joinCM(ServerContext*context,const joinrequest*request,serverresponse*reply\u CM)
相反编译器通过“隐藏重载虚拟函数”警告来指示这一点:)

syntax = "proto3";

package nodes;

service nodejoin
{
rpc joinCM (joinrequest) returns (serverresponse) {}
}

message joinrequest
{
int32 id = 1;
}

message serverresponse
{
string stat = 1;
}
export GRPC_TRACE=api,call_error
export GRPC_VERBOSITY=debug