Skip to content

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

Open
@joenini

Description

@joenini

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions