worldhello_pb2_grpc.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:sea 作者: shanbay 项目源码 文件源码
def add_GreeterServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'SayHello': grpc.unary_unary_rpc_method_handler(
          servicer.SayHello,
          request_deserializer=worldhello__pb2.HelloRequest.FromString,
          response_serializer=worldhello__pb2.HelloReply.SerializeToString,
      ),
      'SayHelloAgain': grpc.unary_unary_rpc_method_handler(
          servicer.SayHelloAgain,
          request_deserializer=worldhello__pb2.HelloRequest.FromString,
          response_serializer=worldhello__pb2.HelloReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'worldhello.Greeter', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号