At the end of the previous section, everything was working fully automated, as expected. However, there is still some room for additional improvements.
As it is, the client-side sends periodical requests to the server-side to see if the email confirmation status has changed. This may lead to a lot of requests to see if there has been a status change or not.
Furthermore, the server-side cannot inform the client-side as soon as an email has been confirmed since it has to wait for a client request to respond to.
In this section, you will learn about the concepts of WebSockets (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/websockets) and how they will allow you to optimize your client-side implementations even more.
WebSockets enable persistent two-way communication channels over TCP, which is especially interesting for applications that need to run real-time communication scenarios (chat, stock tickers, games, and more). It just so happens that our example application is a game, which is one of the main application types that largely benefits from working directly with a socket connection.
We will cover SignalR in the next chapter, that is, Chapter 6, Introducing Razor Components and SignalR.