Here is simple SignalR app example: https://github.com/SignalR/SignalR/wiki/QuickStart-Hubs
I've got this class
public class Chat : Hub
{
public void Send(string message)
{
// Call the addMessage method on all clients
Clients.All.addMessage(message);
}
}
But I don't create an object anywhere by myself so I don't know how to call Send
from server side?
There is a way by using
HubConnection("http://localhost/mysite")
-> chat.Invoke("Send", line).Wait();
But it's looking for me a bit overhead. My main task it to provide an event coming from server to client side so is it possible to make it without using Microsoft.AspNet.SignalR.Client
and HubConnection
?