@livedigital/client 3.4.0 → 3.5.0-add-current-node-getter.1
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/dist/engine/network/Socket.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/engine/network/Socket.ts +4 -0
- package/src/index.ts +4 -0
package/package.json
CHANGED
|
@@ -139,6 +139,10 @@ class SocketIO {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
getServerUrl(): string | undefined {
|
|
143
|
+
return this.serverUrl;
|
|
144
|
+
}
|
|
145
|
+
|
|
142
146
|
private getDisconnectReasonCode(reasonSentence: string): string {
|
|
143
147
|
const reason = String(reasonSentence).toLowerCase();
|
|
144
148
|
return this.knownDisconnectReasonsCodes[reason] || reason;
|
package/src/index.ts
CHANGED
|
@@ -140,6 +140,10 @@ class Client {
|
|
|
140
140
|
public async getTransportsInfo(): Promise<TransportsStateInfo> {
|
|
141
141
|
return this.engine.network.getTransportsStateInfo();
|
|
142
142
|
}
|
|
143
|
+
|
|
144
|
+
public getCurrentNode(): string | undefined {
|
|
145
|
+
return this.engine.network.socket.getServerUrl();
|
|
146
|
+
}
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
export default Client;
|