Learn how to use SignalR to build a chatroom application

Jen-Hsuan Hsieh (Sean)
A Layman
Published in
6 min readJun 30, 2019

--

Copy right@A Layman

The Introduction of SignalR

SignalR is a real-time communication method from ASP .NET. It connects the server side and the client side with the persistent connection. The transportation type of the connection could be to webSockets, foreverFrame, server-sent events, and longPolling.

The regard of the architecture of SignalR, The client can send messages to the hub. The hub can send messages to the specific client, groups of clients, or all clients as well.

Copy right@A Layman

It is readily apparent that developers can use the technique to build applications like the following chatroom.

Copy right@A Layman

The article introduces you how to create it. It has the following sections.

  • The preparation
  • The hub (the server side)
  • The example code for the Hub
  • The client
  • The example code for the client

--

--

Jen-Hsuan Hsieh (Sean)
A Layman

Frontend Developer🚀 Angular • React • Nest • Electron • Micro-frontend • Monorepo Architecture • https://daily-learning.herokuapp.com/