How to map parameters in TscHubConnection.Register method?
Posted: Wed 11 Mar 2020 12:23
Hi All,
This snippet is how we setup our client in javascript:
...
this.connection = new signalR.HubConnectionBuilder()
.withUrl(URL_ENDPOINT, { accessTokenFactory: () => this.loginToken })
.build();
this.connection.on("ReceiveNotification", (info, kind) => this.receiveNotification(info, kind));
yield this.connection.start();
...
Where the info is an object (marshalled as json) & kind is an enum (int).
When setting up a TscHubConnection in Delphi,
how do i map these expected parameters to the TscHubConnection.Register method?
eg:
hubConnection.Register('ReceiveNotification', HandleReceiveNotification, [var??, var??] );
Tia, Rj
This snippet is how we setup our client in javascript:
...
this.connection = new signalR.HubConnectionBuilder()
.withUrl(URL_ENDPOINT, { accessTokenFactory: () => this.loginToken })
.build();
this.connection.on("ReceiveNotification", (info, kind) => this.receiveNotification(info, kind));
yield this.connection.start();
...
Where the info is an object (marshalled as json) & kind is an enum (int).
When setting up a TscHubConnection in Delphi,
how do i map these expected parameters to the TscHubConnection.Register method?
eg:
hubConnection.Register('ReceiveNotification', HandleReceiveNotification, [var??, var??] );
Tia, Rj