ASP.NET Core SignalR is an open-source library that simplifies adding real-time web functionality to apps. Real-time web functionality enables server-side code to push content to clients instantly.
Good candidates for SignalR:
- Apps that require high-frequency updates from the server. Examples are gaming, social networks, voting, auction, maps, and GPS apps.
- Dashboards and monitoring apps. Examples include company dashboards, instant sales updates, or travel alerts.
- Collaborative apps. Whiteboard apps and team meeting software are examples of collaborative apps.
- Apps that require notifications. Social networks, email, chat, games, travel alerts, and many other apps use notifications.
SignalR Core sgcWebSockets component uses WebSocket as transport to connect to a SignalR Core server, if this transport is not supported, an error will be raised.
Delphi Code Examples
Invocations: the Caller sends a message to the Callee and expects a message indicating that the invocation has been completed and optionally a result of the invocation
Example: client invokes SendMessage method and passes as parameters user name and text message. Sends an Invocation Id to get a result message from the server.
Non-Blocking Invocations: the Caller sends a message to the Callee and does not expect any further messages for this invocation. Invocations can be sent without an Invocation ID value. This indicates that the invocation is "non-blocking".
Example: client invokes SendMessage method and passes as parameters user name and text message. The client doesn't expect any response from the server about the result of the invocation.
Streaming Invocations: the Caller sends a message to the Callee and expects one or more results returned by the Callee followed by a message indicating the end of invocation.
Example: client invokes Counter method and requests 10 numbers with an interval of 500 milliseconds.