From the course: Learning SignalR with ASP.NET Core

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

SignalR vs. WebSockets vs. WebRTC

SignalR vs. WebSockets vs. WebRTC

From the course: Learning SignalR with ASP.NET Core

Start my 1-month free trial

SignalR vs. WebSockets vs. WebRTC

- [Instructor] When I started learning SignalR, my first question was, why not just use WebSockets? What benefit does SignalR have over using the WebSockets API that's already in every browser? And what about WebRTC, a separate but related API that's also in most browsers? Let's explore these questions to understand how SignalR fits in. If you haven't heard of WebSockets before, it's an API in modern browsers that makes it possible to create bidirectional connections between a client and a server. It sounds kinda familiar, right? WebSockets is actually the underlying transport that SignalR uses, at least most of the time. SignalR has the ability to fall back to other ways of transporting messages, such as long-polling over HTTP. This is useful in situations where you don't have WebSockets support. This means that SignalR is really an abstraction layer over the underlying transport, so the code that you write doesn't have to know or care how the messages get delivered. When a…

Contents