I am Utpal Vishwas from Uttar Pradesh. Have completed my B. Tech. course from MNNIT campus Prayagraj in 2022. I have good knowledge of computer networking.
SignalR supports multiple transport protocols to enable real-time communication between the server and clients. It automatically selects the best available transport based on the client and server capabilities and network conditions.
Here are the main transport protocols SignalR can use:
1. WebSockets
Description: A full-duplex, persistent connection over a single TCP socket.
When used: If both client and server support it, SignalR will prefer WebSockets because it is the most efficient and lowest latency transport.
Description: A unidirectional connection where the server can push events/messages to the client over HTTP.
When used: If WebSockets are not available but the client supports SSE (mainly modern browsers except IE).
Advantages: Simple to implement, works well for streaming data from server to client.
Limitations: Only server-to-client communication; client cannot send messages over the same connection (SignalR handles this separately).
3. Long Polling
Description: The client sends a request to the server, and the server holds the request open until it has data to send or a timeout occurs. Then the client immediately sends a new request, effectively simulating a continuous connection.
When used: As a fallback when WebSockets and SSE are not available (older browsers, restrictive networks).
Advantages: Works on nearly all browsers and network setups.
Disadvantages: Higher latency and more overhead than WebSockets and SSE.
Transport Selection Summary
Transport
Client Support
Server Support
Direction
Preferred?
WebSockets
Modern browsers
Yes (ASP.NET Core)
Bidirectional
Yes (if available)
Server-Sent Events
Modern browsers (not IE)
Yes
Server-to-client
Yes (fallback)
Long Polling
All browsers
Yes
Bidirectional (via repeated requests)
Last fallback
SignalR’s ability to automatically negotiate and fallback between these transports makes it very robust and compatible with a wide range of client environments.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
SignalR supports multiple transport protocols to enable real-time communication between the server and clients. It automatically selects the best available transport based on the client and server capabilities and network conditions.
Here are the main transport protocols SignalR can use:
1. WebSockets
2. Server-Sent Events (SSE)
3. Long Polling
Transport Selection Summary
SignalR’s ability to automatically negotiate and fallback between these transports makes it very robust and compatible with a wide range of client environments.