ASP.NET SignalR Client

Connect to ASP.NET SignalR (classic) hubs from Delphi/C++Builder. Negotiate, invoke server methods and receive client-side callbacks over a single typed component.

TsgcWSAPI_SignalR

Client for the classic ASP.NET SignalR protocol. Handles the negotiate REST step, the WebSocket connect URL, hub-method invocation and the JSON envelope.

Component class

TsgcWSAPI_SignalR

Protocol

ASP.NET SignalR

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Standard / Professional / Enterprise

Negotiate, invoke, receive

Pair with TsgcWebSocketClient targeting the SignalR endpoint, declare a hub, then call Invoke (server method) and bind to OnSignalRMessage (callbacks).

uses
  sgcWebSocket, sgcWebSocket_API_SignalR;

var
  WSClient: TsgcWebSocketClient;
  SignalR: TsgcWSAPI_SignalR;
begin
  WSClient := TsgcWebSocketClient.Create(nil);
  WSClient.Host := 'signalr.example.com';

  SignalR := TsgcWSAPI_SignalR.Create(nil);
  SignalR.Client := WSClient;
  SignalR.SignalR.Hub := 'chathub';

  WSClient.Active := True;

  // Invoke a server-side method on the hub
  SignalR.Invoke('SendMessage', ['user1', 'hello']);
end;
// uses: sgcWebSocket, sgcWebSocket_API_SignalR
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
TsgcWSAPI_SignalR *SignalR = new TsgcWSAPI_SignalR(this);
SignalR->Client = WSClient;
SignalR->SignalR->Hub = "chathub";

WSClient->Active = true;

What's inside

Implements the legacy ASP.NET SignalR protocol (the pre-Core variant).

Negotiate handshake

The classic SignalR protocol negotiates over HTTP first (connection token, protocol version, transport set). The component performs the negotiate call before opening the WebSocket.

Hub method invocation

Invoke(method, args) sends the hub-style envelope with H (hub), M (method), A (args) fields and a sequence ID; replies arrive as OnSignalRMessage.

Client callbacks

Server-initiated push messages surface as OnSignalRClientCallback(method, args) — the component parses the M / A envelope and delivers raw JSON arguments.

Reconnection

On disconnect the component re-negotiates and resumes the connection ID. WatchDog on the underlying client handles transport-level retries.

Cookies & auth

Authentication cookies are propagated from the negotiate call into the WebSocket handshake automatically. Configure custom headers via the underlying client.

Mature but classic

Classic SignalR is still maintained for ASP.NET 4.x apps. For .NET Core / .NET 5+ hubs use the sibling TsgcWSAPI_SignalRCore component instead.

Specifications & references

Authoritative sources for the protocol this component implements.

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Online Help — API_SignalR Full property, method and event reference for this component.
Free Trial — sgcWebSockets Download the trial package to connect to ASP.NET SignalR hubs from Delphi.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.

Ready to Talk to a SignalR Hub?

Download the free trial and connect to ASP.NET SignalR hubs from your Delphi applications.