DescriptionMojo: Change the way message pipes are passed over channels.
Before:
* We'd send the message "containing" the message pipe (handle) first.
* Upon receiving it, the other side would create an endpoint (and
dispatcher, etc.)
* The other side then sent a message back indicating the new ID (and
telling the first side to run the message pipe.
* Upon receiving that "run" message, the first side would start sending
messages for that message pipe.
This makes for rather complicated handshaking, which would only get more
complicated if, e.g., the second side wanted to forward the message pipe
handle that it received to someone else (e.g., over another channel).
Now:
* We "remotely allocate" an ID for the other side and send a message
telling it to create an endpoint with that ID.
* We forward all the messages queued to that message pipe endpoint
immediately (since we already know the destination ID).
* We send the message "containing" the message pipe (handle).
* The other side then creates a dispatcher and associates it with the
(already-existing) endpoint.
Still to do:
* We need to track IDs that we've allocated for the remote side more
carefully (in case of wrap-around, to avoid collisions).
* Convert everything over to the "attach and run" mode of operation (and
possibly rename "attach and run" to something shorter), and delete the
various separate "attach" and "run" methods.
R=brettw@chromium.org
Committed: https://crrev.com/df8e15ae21198cb6ac1587a07a179fa26655048c
Cr-Commit-Position: refs/heads/master@{#300157}
Patch Set 1 #
Messages
Total messages: 7 (1 generated)
|