Sobes.tech
Junior — Middle

Can you describe the different modes of SignalR and their features?

sobes.tech AI

Answer from AI

SignalR supports multiple transport modes for communication between client and server, selecting the optimal one based on environment capabilities:

  1. WebSockets — the most efficient and modern mode, providing bidirectional communication with low latency. Used if supported by the browser and server.

  2. Server-Sent Events (SSE) — one-way communication from server to client, used if WebSockets are unavailable.

  3. Long Polling — emulation of a persistent connection through periodic HTTP requests, used as a fallback when other modes are unavailable.

Features:

  • SignalR automatically selects the best available transport.
  • WebSockets requires support on both server and client, as well as open ports.
  • SSE works only for browsers supporting EventSource.
  • Long Polling is less efficient and may create additional load.

Thus, SignalR provides reliable and adaptive communication, choosing the appropriate mode depending on conditions.

Can you describe the different modes of SignalR and… - sobes.tech