def AddsOnes(self, request_iterator, context): self.count += 1 return (AddTypes_pb2.Sum(number=request.number + 1) for request in request_iterator)
def AddOnes(self, request, context): self.count += 1 return (AddTypes_pb2.Sum(number=request.number + x + 1) for x in range(request.number))
def AddsOne(self, request_iterator, context): self.count += 1 return AddTypes_pb2.Sum(number=sum(request.number for request in request_iterator) + 1)
def AddOne(self, request, context): self.count += 1 return AddTypes_pb2.Sum(number=request.number + 1)