Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Conversation

@stuartmorgan-g
Copy link
Collaborator

Implements BasicMessageChannel, adds MessageCodec, and makes
JsonMessageCodec public.

Converts the key event handler from using BinaryMessenger directly to
using a BasicMessageChannel to send events now that it's available.

Implements BasicMessageChannel, adds MessageCodec, and makes
JsonMessageCodec public.

Converts the key event handler from using BinaryMessenger directly to
using a BasicMessageChannel to send events now that it's available.
Copy link
Contributor

@awdavies awdavies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a little confused about some impl details.


// Registers a handler that should be called any time a message is
// received on this channel.
void SetMessageHandler(MessageHandler<T> handler) const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused about what this does. It doesn't look like it gets called anywhere? Is this just due to the implementation of the key event handler/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the key event handler is send-only, so never does this. I just didn't want to add MessageChannel without half of its functionality.

It does the same thing SetMethodCallHandler does on MethodChannel, just without the extra structure assumed on the message.

@stuartmorgan-g stuartmorgan-g merged commit 867e99e into google:master Jan 9, 2019
@stuartmorgan-g stuartmorgan-g deleted the cpp-message-channel branch February 6, 2019 18:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants