def add_LocationServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'registerClient': grpc.unary_unary_rpc_method_handler(
servicer.registerClient,
request_deserializer=proto_dot_location__service__pb2.ClientInfo.FromString,
response_serializer=proto_dot_location__service__pb2.ServerInfo.SerializeToString,
),
'getLocations': grpc.unary_stream_rpc_method_handler(
servicer.getLocations,
request_deserializer=proto_dot_location__service__pb2.ClientInfo.FromString,
response_serializer=proto_dot_location__service__pb2.Location.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'opencv_object_tracking.LocationService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
location_service_pb2_grpc.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录