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