WeChat official account : Fun programming ACE
Pay attention to learn more about .NET Daily actual combat development skills , For source code Please leave a message at the backstage of official account Source code
[ If you think this official account is helpful to you , Welcome to your attention ]
Previous review
SignalR Basic use of
Link to the original text :
brief introduction
1.SignalR Is a Microsoft open source library , It is used for the mutual communication between the client and the server .
2. As previously outlined WebSocket、SSE、 Long polling, etc ,SignalR All support , In addition, it can automatically select the best communication mode .
3. As for the purpose , It is mainly used in scenarios with high real-time requirements , such as : Chat 、 Kanban 、 Announcement, etc
Server implementation
newly build .net6 project
1. Inject SignalR Services needed
2. Inject SignalR Services needed
3. Turn on SignalR Routing nodes for
3. Customize a Hub type Inherit Hub
4. rewrite Hub in Connection and closing methods
5. The logging middleware is introduced into the constructor
6. Write the communication method with the client
Client implementation
1. quote js library
2. Write a call script
The above is SignalR The basic method to realize the communication between client and server , The next article will demonstrate packet communication
More wonderful contents are available in the official account :



![[buuctf.reverse] 115_[RCTF2019]DontEatMe](/img/52/00a29906ba2f79d5bac7de52d97871.png)



![P4580 [BJOI2014]路径](/img/d5/ac1e5312b33f607131f6dc9681755d.png)




