prpc.RpcResponse

class prpc.rpc_response.RpcResponse(start_call, on_message, loop)

Top-level outgoing call representation.

Should be used as a asynchronous context manager, e.g.:

async with connection.call_istream("method_name") as call:
    async for msg in call.stream:
        process_message(msg)

Note

Should not be instantiated directly. Connection will create instances as neeeded.

result

Get the call return value as future.

Warning

Closes the call’s stream (if it exists).

stream

Get stream instance (if any). Returns ‘None’ for unary calls.

coroutine cancel()

Try to cancel remote call.