Pusher Channels
Subscribe to Pusher channels and receive real-time events from your Delphi applications using the Pusher protocol.
Subscribe to Pusher channels and receive real-time events from your Delphi applications using the Pusher protocol.
A native Delphi client for Pusher Channels, supporting public, private, and presence channels.
The sgcWebSockets Pusher component implements the Pusher protocol, enabling Delphi applications to subscribe to channels and bind to events. Support for public, private, and presence channels with automatic authentication handling.
Subscribe to a Pusher channel and receive events.
uses
sgcWebSocket_API_Pusher;
var
Pusher: TsgcWebSocketAPI_Pusher;
procedure TForm1.FormCreate(Sender: TObject);
begin
Pusher := TsgcWebSocketAPI_Pusher.Create(nil);
Pusher.PusherOptions.AppKey := 'your-app-key';
Pusher.PusherOptions.Cluster := 'eu';
Pusher.OnPusherEvent := OnEvent;
Pusher.Connect;
end;
procedure TForm1.Subscribe;
begin
Pusher.Subscribe('my-channel');
end;
procedure TForm1.OnEvent(Sender: TObject;
aChannel, aEvent, aData: string);
begin
Memo1.Lines.Add(aChannel + '/' + aEvent +
': ' + aData);
end;
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.