Sending Non-Hub messages
Sending non-hub messages to the server is easy as calling a function on the connection object:
signalRConnection.Send(new { Type = "Broadcast", Value = "Hello SignalR World!" });
This function will encode the given object to a Json string using the Connection’s JsonEncoder, and sends it to the server.
Already encoded Json strings can be sent using the SendJson function:
signalRConnection.SendJson("{ Type: ‘Broadcast’, Value: ‘Hello SignalR World!’ }");