简体   繁体   English

SignalR客户端默认后备传输

[英]SignalR Client Default Fallback Transport

For the case of an SignalR client using .Net Framework 4.0 to connect to the server (therefore no WebSockets transport supported) which would be the next fallback transport ? 对于使用.Net Framework 4.0连接到服务器的SignalR客户端 (因此不支持WebSockets传输),这将是下一个后备传输?

Moreover, if there is a fallback chain it would be great to know it. 而且,如果有一个后备链,那么知道它会很棒。

From https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/introduction-to-signalr#transports-and-fallbacks the following are used if WebSockets is unavailable: https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/introduction-to-signalr#transports-and-fallbacks ,如果WebSockets不可用,则使用以下内容:

  • Server Sent Events, also known as EventSource (if the browser supports Server Sent Events, which is basically all browsers except Internet Explorer.) Server Sent Events,也称为EventSource(如果浏览器支持Server Sent Events,基本上是除Internet Explorer之外的所有浏览器。)
  • Forever Frame (for Internet Explorer only). 永远帧(仅适用于Internet Explorer)。 Forever Frame creates a hidden IFrame which makes a request to an endpoint on the server that does not complete. Forever Frame创建一个隐藏的IFrame,它向服务器上未完成的端点发出请求。 The server then continually sends script to the client which is immediately executed, providing a one-way realtime connection from server to client. 然后,服务器不断向客户端发送脚本,该脚本立即执行,提供从服务器到客户端的单向实时连接。 The connection from client to server uses a separate connection from the server to client connection, and like a standard HTML request, a new connection is created for each piece of data that needs to be sent. 从客户端到服务器的连接使用从服务器到客户端连接的单独连接,并且像标准HTML请求一样,为每个需要发送的数据创建新连接。
  • Ajax long polling. Ajax长期投票。 Long polling does not create a persistent connection, but instead polls the server with a request that stays open until the server responds, at which point the connection closes, and a new connection is requested immediately. 长轮询不会创建持久连接,而是使用一个保持打开的请求轮询服务器,直到服务器响应,此时连接关闭,并立即请求新连接。 This may introduce some latency while the connection resets. 这可能会在连接重置时引入一些延迟。

Update: The latest docs are available here: http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/introduction-to-signalr 更新:最新文档可在此处获取: http//www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/introduction-to-signalr

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM