@trudb/tru-common-lib 0.0.485 → 0.0.487
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.
- package/esm2020/lib/services/tru-connection-hub.mjs +10 -9
- package/fesm2015/trudb-tru-common-lib.mjs +10 -10
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +9 -8
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/services/tru-connection-hub.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5608,18 +5608,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
5608
5608
|
}] });
|
|
5609
5609
|
|
|
5610
5610
|
const connection = new signalR.HubConnectionBuilder()
|
|
5611
|
-
.withUrl("https://localhost:44476/notificationhub"
|
|
5612
|
-
|
|
5613
|
-
.
|
|
5611
|
+
.withUrl("https://localhost:44476/notificationhub", {
|
|
5612
|
+
skipNegotiation: true,
|
|
5613
|
+
transport: signalR.HttpTransportType.WebSockets,
|
|
5614
|
+
}).withAutomaticReconnect().build();
|
|
5614
5615
|
class TruConnectionHub {
|
|
5615
5616
|
constructor() {
|
|
5616
|
-
this.start =
|
|
5617
|
+
this.start = () => {
|
|
5618
|
+
connection.on("change", (value) => {
|
|
5619
|
+
console.log(JSON.parse(value));
|
|
5620
|
+
});
|
|
5617
5621
|
try {
|
|
5618
|
-
|
|
5622
|
+
connection.start().then(() => {
|
|
5619
5623
|
console.log(`SignalR connection success! connectionId: ${connection.connectionId}`);
|
|
5620
|
-
connection.on("change", (value) => {
|
|
5621
|
-
console.log(JSON.parse(value));
|
|
5622
|
-
});
|
|
5623
5624
|
});
|
|
5624
5625
|
}
|
|
5625
5626
|
catch (error) {
|