MediaSFU React Native
    Preparing search index...

    Function connectLocalSocket

    • Connects to a local media socket using the provided connection options.

      Parameters

      Returns Promise<ResponseLocalConnection>

      A promise that resolves to the connected socket and data.

      const options = {
      link: 'http://localhost:3000',
      };

      try {
      const { socket, data } = await connectLocalSocket(options);
      console.log('Connected to socket:', socket, data);
      } catch (error) {
      console.error('Failed to connect to socket:', error);
      }