Return value for client methods #1149

flipchart opened this Issue Dec 16, 2012 · 8 comments


None yet

9 participants


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.

SignalR member

Maybe sometime in the far future. Moving to backlog.


I would still like to see this feature implemented at some point.


Me too.


While I understand this would be hard for "broadcasts" it would be great to have this for "single receiver calls".

SignalR member

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.

@DamianEdwards DamianEdwards added the v3 label Jun 24, 2014

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment