---
title: "What are the different transport protocols SignalR can use for communication?"  
description: "What are the different transport protocols SignalR can use for communication?"  
author: "Utpal Vishwas"  
published: 2025-05-21  
updated: 2025-05-21  
canonical: https://www.mindstick.com/interview/34151/what-are-the-different-transport-protocols-signalr-can-use-for-communication  
category: "c#"  
tags: ["c#", "signalr", "chat", "chat app"]  
reading_time: 4 minutes  

---

# What are the different transport protocols SignalR can use for communication?

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.
- **Advantages:** Low overhead, bidirectional communication, real-time updates.
- **Support:** Modern browsers, ASP.NET Core servers.

### 2. Server-Sent Events (SSE)

- **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.

## Answers

### Answer by Utpal Vishwas

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.
- **Advantages:** Low overhead, bidirectional communication, real-time updates.
- **Support:** Modern browsers, ASP.NET Core servers.

### 2. Server-Sent Events (SSE)

- **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.


---

Original Source: https://www.mindstick.com/interview/34151/what-are-the-different-transport-protocols-signalr-can-use-for-communication

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
