Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to handle messages without event? #89

Open
baegmon opened this issue May 5, 2022 · 0 comments
Open

A way to handle messages without event? #89

baegmon opened this issue May 5, 2022 · 0 comments

Comments

@baegmon
Copy link

baegmon commented May 5, 2022

I'm looking through the examples and source code but I can't seem to get an idea of how to do this. I send my message using the following:

hub_connection.send( "GetMessages", arguments=[""], on_invocation=on_success )

This works fine and from here I am expecting a couple of messages:

Raw message incomming:
Message received{"type":3,"invocationId":"77e18329-dae3-4893-a4a9-d5ba7f891575","result":null
Raw message incomming:
Message received{"type":3,"invocationId":"0d53d44a-82ff-4695-bd8e-91bbb25731fa","result":[...snipped data]

My send message results in the server sending two messages, which I successfully receive by looking at trace. I can handle the first message fine via "on_invocation" function (I can print the result and show that it is None). However; I can't seem to intercept the second request which does not have an empty "result".

Is there a way to intercept multiple requests in the on_invocation function or a way to manually handle the raw messages received?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant