@trudb/tru-common-lib 0.0.481 → 0.0.483
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5608,7 +5608,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
5608
5608
|
}] });
|
|
5609
5609
|
|
|
5610
5610
|
const connection = new signalR.HubConnectionBuilder()
|
|
5611
|
-
.withUrl("/notificationhub", {
|
|
5611
|
+
.withUrl("https://localhost:44476/notificationhub", {
|
|
5612
5612
|
skipNegotiation: true,
|
|
5613
5613
|
transport: signalR.HttpTransportType.WebSockets
|
|
5614
5614
|
})
|
|
@@ -5617,11 +5617,17 @@ const connection = new signalR.HubConnectionBuilder()
|
|
|
5617
5617
|
class TruConnectionHub {
|
|
5618
5618
|
constructor() {
|
|
5619
5619
|
this.start = async () => {
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5620
|
+
try {
|
|
5621
|
+
await connection.start().then(() => {
|
|
5622
|
+
console.log(`SignalR connection success! connectionId: ${connection.connectionId}`);
|
|
5623
|
+
connection.on("change", (value) => {
|
|
5624
|
+
console.log(JSON.parse(value));
|
|
5625
|
+
});
|
|
5626
|
+
});
|
|
5627
|
+
}
|
|
5628
|
+
catch (error) {
|
|
5629
|
+
console.log(`SignalR connection error: ${error}`);
|
|
5630
|
+
}
|
|
5625
5631
|
};
|
|
5626
5632
|
}
|
|
5627
5633
|
}
|