ASP.NET Core SignalR Client
Connect to ASP.NET Core SignalR hubs from Delphi/C++Builder. Speaks the JSON hub protocol with negotiated WebSocket transport.
Connect to ASP.NET Core SignalR hubs from Delphi/C++Builder. Speaks the JSON hub protocol with negotiated WebSocket transport.
Client for the ASP.NET Core SignalR protocol — handshake (json hub protocol), invocation messages, streaming, completion and the keep-alive ping.
TsgcWSAPI_SignalRCore
Windows, macOS, Linux, iOS, Android
Standard / Professional / Enterprise
Pair with TsgcWebSocketClient pointing at the hub URL, the component negotiates and performs the JSON-protocol handshake, then invoke methods.
uses
sgcWebSocket, sgcWebSocket_API_SignalRCore;
var
WSClient: TsgcWebSocketClient;
Hub: TsgcWSAPI_SignalRCore;
begin
WSClient := TsgcWebSocketClient.Create(nil);
WSClient.URL := 'wss://signalr.example.com/chatHub';
Hub := TsgcWSAPI_SignalRCore.Create(nil);
Hub.Client := WSClient;
WSClient.Active := True;
// Server method "SendMessage" with two args
Hub.Invoke('SendMessage', ['alice', 'hello']);
end;
// uses: sgcWebSocket, sgcWebSocket_API_SignalRCore
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
WSClient->URL = "wss://signalr.example.com/chatHub";
TsgcWSAPI_SignalRCore *Hub = new TsgcWSAPI_SignalRCore(this);
Hub->Client = WSClient;
WSClient->Active = true;
Implements the SignalR Core JSON hub protocol on top of TsgcWebSocketClient.
Performs the HTTP negotiate call (when needed) and sends the {"protocol":"json","version":1} handshake frame, parsing the server's ack before delivering OnConnect.
Invoke(target, args) sends a type:1 invocation envelope and tracks the invocationId. OnSignalRCoreResult fires with the typed return value when a completion arrives.
Supports server-side IAsyncEnumerable / streaming hubs — StreamInvocation opens a stream and OnSignalRCoreStreamItem delivers each item before the final completion.
SignalR Core uses type:6 ping messages on a 15-second cadence; the component sends and answers them automatically.
Pass a Bearer token via the underlying client's QueryString (?access_token=...) or custom Authorization header — SignalR Core supports both.
Bind OnSignalRCoreClientCallback for server-pushed method invocations. Reply to client-method calls by returning the parsed JSON arguments from your handler.
Authoritative sources for the protocol this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — API_SignalRCore Full property, method and event reference for this component. | Open | |
| Free Trial — sgcWebSockets Download the trial package and connect to .NET Core / .NET 5+ SignalR hubs from Delphi. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |