Hub methods on the server are able to have return values for the client to consume, but not the other way around. This means that the server cannot call a client and get a value from the method invocation. It would be great if this could be added as it would make server and client more symmetrical in their abilities.
Maybe sometime in the far future. Moving to backlog.
I would still like to see this feature implemented at some point.
While I understand this would be hard for "broadcasts" it would be great to have this for "single receiver calls".
Technically possible, but very easily mimicked in app code without SignalR having to do some heavy lifting under the covers.
We'll move this to the new repo as a candidate for v3 or beyond.
How would I mimic this in my app code?
Good question. How would I mimic this in my app code? Any hints?
All you would need to do is have a call back method defined in your hub, so that the client instead of returning a value per se, would be calling a new method on the hub and passing the "return" value as the method parameter. You could then bundle this all together with the TPL so that both the initial call and the call back could be awaited using the EAP pattern as illustrated here: https://msdn.microsoft.com/en-us/library/ee622454(v=vs.110).aspx