@trap_stevo/filetide-client 0.0.15 → 0.0.16

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.
@@ -169,7 +169,7 @@ class FileTideClient {
169
169
  maxReconnectionAttempts: 15,
170
170
  reconnectionAttempts: 15,
171
171
  maxReconnectionDelay: 10000
172
- }, onConnect = null, ...clientConfigurations) {
172
+ }, onConnect = null, onDisconnect = null, ...clientConfigurations) {
173
173
  const launchClient = () => {
174
174
  if (this.fileMessagerInstance && this.fileMessagerInstance.clientTide) {
175
175
  this.fileMessagerInstance.clientTide.closeSocket(this.deviceName);
@@ -205,6 +205,9 @@ class FileTideClient {
205
205
  });
206
206
  fileMessager.clientTide.onEvent(this.deviceName, "disconnect", () => {
207
207
  this.broadcastClientOffline(fileMessager);
208
+ if (onDisconnect) {
209
+ onDisconnect(this.deviceName, this.connectionID, this.tideUrl);
210
+ }
208
211
  });
209
212
  }, ...clientConfigurations);
210
213
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide-client",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Seamless, real-time file transfers between devices with effortless connectivity. Allowing for powerful, instant, secure, and cross-platform file sharing, enabling efficient and reliable data transfers in any network environment.",
5
5
  "main": "dist/cjs/FileTideClient.js",
6
6
  "exports": {