Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call specific client from SignalR

I want to call specific client from server, and not broadcast to all of them. Problem is that I'm in scope of some AJAX request (in .aspx codebehind let say), and not in Hub or PersistentConnection, so don't have Clients property - and client who made that ajax (jquery) call is not the client I want to send signalr message!

Now, I have one hub that it's called on JS page load, which registers new client into server static list, so I have client Guids. But don't know how to use that to send message from server to specific client.

like image 977
Hrvoje Hudo Avatar asked Oct 24 '11 07:10

Hrvoje Hudo


People also ask

Is SignalR two way communication?

SignalR the newest member of the ASP.NET family, that enables developers to write incredibly simple real-time, two-way websites and apps. Two-way communication means that both the server and client share an open channel in which they can initiate contact with each other.


1 Answers

See the docs for the latest:

Persistent connections - https://github.com/SignalR/SignalR/wiki/PersistentConnection

Hubs - http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-server

like image 81
davidfowl Avatar answered Sep 19 '22 19:09

davidfowl