Commit 8bd82c24 authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

[mojo docs] Clarify bidirectional communication with Mojo.

Typically, this is done with pairs of *interfaces*, not just pairs
of message pipes.

Change-Id: I4e83f45fda6b9666148bdd10a7c86ae727d41682
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755407
Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687330}
parent 4f16cf55
...@@ -83,10 +83,11 @@ And the other endpoint is the receiving/callee, represented as: ...@@ -83,10 +83,11 @@ And the other endpoint is the receiving/callee, represented as:
mojo::Receiver<math::mojom::Math> receiver_; mojo::Receiver<math::mojom::Math> receiver_;
``` ```
This allows limited bidirectional communication: the sender can make any number This allows limited bidirectional communication. For one interface, the sender
of calls to the receiver, and the receiver may send a single reply for each (A) may make any number of calls to the receiver (B). (B) may send a single
call. More expressive APIs (that require any number of calls to flow in both reply for each call from (A). More expressive APIs are often implemented as a
directions) are often implemented as a pair of message pipes. pair of interfaces (with two underlying message pipes), allowing calls to be
made in either direction between (A) and (B).
Message pipe endpoints are typically created using one of: Message pipe endpoints are typically created using one of:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment