Ejemplo n.º 1
0
 async def SayHelloToManyAtOnce(self, messages):
     print("Got SayHelloToManyAtOnce")
     names = []
     async for message in messages:
         names.append(message.name)
     print("Returning from SayHelloToManyAtOnce")
     return greeter_pb2.HelloReply(message="".join(names))
Ejemplo n.º 2
0
 def SayGreeting(self, request, context):
     response_string = 'Valar Morghulis, %s!' % request.name
     return greeter.HelloReply(message=response_string)
Ejemplo n.º 3
0
 async def SayHello(self, message):
     return greeter_pb2.HelloReply(message=message.name)
Ejemplo n.º 4
0
 async def SayHelloToMany(self, messages):
     async for message in messages:
         await yield_(greeter_pb2.HelloReply(message=message.name))
Ejemplo n.º 5
0
 async def SayHelloToManyAtOnce(self, messages):
     names = []
     async for message in messages:
         names.append(message.name)
     return greeter_pb2.HelloReply(message="".join(names))
Ejemplo n.º 6
0
 async def SayHelloGoodbye(self, message):
     await yield_(greeter_pb2.HelloReply(message=message.name))
     await yield_(greeter_pb2.HelloReply(message=message.name))