Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different behaviour between iOS [No results] and Android [Working] #32

Open
joenini opened this issue Mar 20, 2024 · 0 comments
Open

Different behaviour between iOS [No results] and Android [Working] #32

joenini opened this issue Mar 20, 2024 · 0 comments

Comments

@joenini
Copy link

joenini commented Mar 20, 2024

I am using react-native-ssdp in a react native example project.

I have the following code:

import { Client } from 'react-native-ssdp';
import { filter } from './constants'

export function startSSDPDiscovery(){
    console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Starting Discovery");

    console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Creating Client');
    var client = new Client();

    client.on('response', (headers, statusCode, rinfo) => {
        console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> rinfo:', rinfo);
        console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Headers:', headers);
        console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> statusCode:', statusCode)
    });
    
    
    console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Starting Search');

    client.search(filter);
}

I am getting the following logs on Android:

 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Starting Discovery
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Creating Client
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Starting Search
 LOG  socket-8 binding, address: 0.0.0.0 port: 0
 LOG  socket-9 bound to address: 0.0.0.0 port: 0
 WARN  react-native-udp: setMulticastTTL() is not implemented
 LOG  socket-8 bound to address: 0.0.0.0 port: 0
 WARN  react-native-udp: setMulticastTTL() is not implemented
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> rinfo: {...}
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Headers: {...}
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> statusCode: 200
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> rinfo: {...}
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Headers: {...}
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> statusCode: 200

However on iOS I am not getting any response just the following logs:

 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Starting Discovery
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Creating Client
 LOG  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Starting Search
 LOG  socket-0 binding, address: 0.0.0.0 port: 0
 LOG  socket-1 bound to address: 0.0.0.0 port: 57910
 WARN  react-native-udp: setMulticastTTL() is not implemented
 LOG  socket-0 bound to address: 0.0.0.0 port: 50691
 WARN  react-native-udp: setMulticastTTL() is not implemented

I am using the following:

Header Header
react-native 0.73.4
react-native-network-info ^5.2.1
react-native-ssdp ^2.8.2
react-native-udp ^4.1.7
iOS 16.7.5
Android 12
@joenini joenini changed the title Different behaviour between iOS [Error: Must bind a socket before joining a multicast group] and Android [Working] Different behaviour between iOS [No results] and Android [Working] Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant