mjb
mjb

Reputation: 7969

How does ASP.NET-SignalR works on client side (browser)?

How does ASP.NET SignalR works on client side?

Is it using a Javascript Looping timer?

For example: the javascript check the latest status/message from the server every 100 milisecond?

Upvotes: 2

Views: 616

Answers (2)

Janitha Tennakoon
Janitha Tennakoon

Reputation: 906

It depends on the what type of transport method that have been used for connection. Signalr tries WebSockets, Server Sent Events, IFrame and then long polling. For each how it works varies.

Upvotes: 0

Frank M
Frank M

Reputation: 1439

There are too many variables to answer that question. Many factors depend on how you are connected, what the server supports along with what the client supports. Your browser may or may not support Web Sockets which is the most ideal connection generally. That changes the answer versus long polling for example.

I would recommend reading up on the official site. Here is the link, specifically the guide for JavaScript clients.

https://learn.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/hubs-api-guide-javascript-client

Upvotes: 3

Related Questions