Ejemplo n.º 1
0
 def StreamingOutputCall(self, request, context):
     _maybe_echo_status_and_message(request, context)
     for response_parameters in request.response_parameters:
         yield messages_pb2.StreamingOutputCallResponse(
             payload=messages_pb2.Payload(type=request.response_type,
                                          body=b"\x00" *
                                          response_parameters.size))
Ejemplo n.º 2
0
 def FullDuplexCall(self, request_iterator, context):
     _maybe_echo_metadata(context)
     for request in request_iterator:
         _maybe_echo_status_and_message(request, context)
         for response_parameters in request.response_parameters:
             yield messages_pb2.StreamingOutputCallResponse(
                 payload=messages_pb2.Payload(
                     type=request.payload.type,
                     body=b"\x00" * response_parameters.size,
                 ))
Ejemplo n.º 3
0
 def UnaryCall(self, request, context):
     _maybe_echo_metadata(context)
     _maybe_echo_status_and_message(request, context)
     return messages_pb2.SimpleResponse(
         payload=messages_pb2.Payload(type=messages_pb2.COMPRESSABLE,
                                      body=b"\x00" * request.response_size))