MediaSFU React Native
    Preparing search index...

    Function disconnectSocket

    • Disconnects from the socket.

      Parameters

      Returns Promise<boolean>

      • A promise that resolves once the socket is disconnected.
      const options = { socket: socketInstance };

      try {
      const isDisconnected = await disconnectSocket(options);
      console.log('Disconnected:', isDisconnected);
      } catch (error) {
      console.error('Failed to disconnect:', error);
      }