DEV Community

Discussion on: SignalR core python client (V): Reconnecting Client

Collapse
 
mirstation2001 profile image
Javier Barreiro

How to get the return value of the .send function (async).
If in the Hub (signalr hub in c#), there is a function, for example public string FOO() that returns a value, how to get that value calling to
hub_connection.send("FOO", [])

.send does not seem to be ASYNC function
Thanks

Collapse
 
mandrewcito profile image
Andrés Baamonde Lozano

Hi,

This functionality solves your problem? github.com/mandrewcito/signalrcore...
If does not, let me know

thank you!

Collapse
 
mirstation2001 profile image
Javier Barreiro

Not sure. Is it the on_invocation parameter? I tried but did not understand how to get the return value.
Do you have an example?
Thanks!

Thread Thread
 
mandrewcito profile image
Andrés Baamonde Lozano

Yes,

Here are 2 examples of using the callback. There is no return value, websocket methods are not synchronous. To listen from a callback , you must wait for a message with your invocation id.

github.com/mandrewcito/signalrcore...
github.com/mandrewcito/signalrcore...