Beispiel #1
0
def _sum(request_iterator, unused_context):
    accumulation = 0
    for request in request_iterator:
        accumulation += request.num
    return math_pb2.Num(num=accumulation)
Beispiel #2
0
def _fib(request, unused_context):
    for number in _fibbonacci(request.limit):
        yield math_pb2.Num(num=number)