麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 開發設計 > 正文

SignalR: The new old thing

2019-11-15 02:25:59
字體:
來源:轉載
供稿:網友

SignalR: The new old thing

As you can see, this is my first blog posted in cnblog. If you find any mistake, don’t hesitate to tell me, I will buy you ice cream.

Today I want to talk about SignalR, a .Net real time library PRovided by asp.net team, which is such an old concept that it has been around for over 10 years. But real time technology is relatively recently that we’ve started seeing them used (or advertised). I think it’s mainly because this tech has matured and become standardised.

Warm up

If this is the first time you heard of SignalR, you may want to get started with sometutorialsabout adding real-time functionality to a web/desktop application. It’s a good habit to code yourself while learning new things.

Architecture

After going through the samples, you can know how this is implemented, the architecture is really simple. All connections between clients and server side are full duplex. Clients can send messages to the server as they always do, server can also push notifications to a specific client. But clients won’t talk to each other. From this point of view, you may find the server code is more or less a router.

The only question left for us is , what kind of message should we send?

“There is one thousand Hamlet in one thousand reader’s eyes”. If you are building a online chat room like Jabbr, you’d like to send/receive encrypted texts and images. If you are developing an online game, the messages would be more complex. Anyway, it just depends on your needs.

Platform and Protocol

SignalR is supported under a variety of server and client configurations. Meanwhile, each transport option has a set of requirement of its own. Like WebSocket, SignalR supports this new technique, but it falls back to other compatible techniques for older browsers or clients gracefully.

In server side, If you want to use WebSocket, Windows Server 2012 or Windows 8 is required. WebSocket can even be used on Windows Azure websites, as long as the site’s .NET framework version is set to 4.5 and WebSocket option is enabled.

While in Client side, the situation may be more complex. It varies from Web Browser, Windows desktop applications, Silverlight application to mobile devices. Just as you can see below, SignalR may use Forever Frame, Server-Sent Events or Long Polling if WS is somehow not supported.

protocol

However, as a .NET developer, you will never be bothered which protocol to choose. You can even regard SignalR as a wrapper and do not care about the inner implementation. SignalR would decide which protocol is the best and switch to it.

As SignalR supports multi platforms, it is such a relief to .NET developers that we don’t need to learn more libraries doing the same thing. A stable and easy-to-use library is enough. I even leverage SignalR in my personal Chrome Extension then I have a perfect real time logging module.

For more information

You can read its documentation for more details. As SignalR is open-source, you can follow its repo in github then read its source code directly. BTW, I have to say .NET is really powerful and I’m just a newbie to this fresh new world.


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 美国av在线免费观看 | 日本在线视频一区二区三区 | 欧美成人精品 | 国产羞羞视频免费在线观看 | 一级黄色毛片播放 | 国产真实孩交 | 亚洲国产高清视频 | 91精品国产777在线观看 | 黄色av网站免费 | 毛片视频播放 | 激情亚洲一区二区三区 | 毛片网站网址 | 免费在线观看亚洲 | 国产午夜精品理论片a级探花 | 成人毛片100部免费观看 | 粉嫩粉嫩一区二区三区在线播放 | 国产精品视频六区 | 毛片视频播放 | 日本在线播放一区二区三区 | 久久色网站 | 欧美成人综合视频 | 久久精品一区二区三区不卡牛牛 | 今井夏帆av一区二区 | 久久综合久久精品 | 久久久久久久久久综合 | 午夜影院日韩 | 911网站大全在线观看 | 久久久久久久久浪潮精品 | 高清在线观看av | 欧洲精品久久久久69精品 | 欧美四级在线观看 | 成人免费入口 | 国产自在线 | 欧美片一区二区 | 斗罗破苍穹在线观看免费完整观看 | 精品一区二区在线视频 | 亚洲午夜不卡 | 国产成人精品二区 | 国产免费观看a大片的网站 欧美成人一级 | 密室逃脱第一季免费观看完整在线 | 黄色片免费在线播放 |