Code Monkey home page Code Monkey logo

demo.signalr's Introduction

Demo SignalR with ASP.NET Core

What is SignalR?

ASP.NET SignalR is a library for ASP.NET developers that simplifies the process of adding real-time web functionality to applications.

SignalR provides a simple API for creating server-to-client remote procedure calls (RPC) that call JavaScript functions in client browsers (and other client platforms) from server-side .NET code. SignalR also includes API for connection management (for instance, connect and disconnect events), and grouping connections.

SignalR applications can scale out to thousands of clients using built-in, and third-party scale-out providers.

Built-in providers include:

  • Service Bus
  • SQL Server
  • Redis

Third-party providers include:

  • NCache

SignalR and WebSocket

SignalR uses the new WebSocket transport where available and falls back to older transports where necessary.

Transports and fallbacks

  • WebSocket (the optimal transport for SignalR)
  • Server Sent Events (aka EventSource )
  • Forever Frame (for Internet Explorer only)
  • Ajax long polling

Monitoring transports

You can determine what transport your application is using by enabling logging on your hub, and opening the console window in your browser. To enable logging for your hub's events in a browser, add the following command to your client application:

$.connection.hub.logging = true;

Connections and Hubs

The SignalR API contains two models for communicating between clients and servers:

  1. Persistent Connections. A Connection represents a simple endpoint for sending single-recipient, grouped, or broadcast messages.
  2. Hubs. A Hub is a more high-level pipeline built upon the Connection API that allows your client and server to call methods on each other directly.

How Hubs work

When server-side code calls a method on the client, a packet is sent across the active transport that contains the name and parameters of the method to be called (when an object is sent as a method parameter, it is serialized using JSON). The client then matches the method name to methods defined in client-side code. If there is a match, the client method will be executed using the deserialized parameter data.


Links:

demo.signalr's People

Contributors

liteobject avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.