react-native-lanscan icon indicating copy to clipboard operation
react-native-lanscan copied to clipboard

TypeError: Cannot read property 'scan' of undefined

Open Eduardo-Maia98 opened this issue 4 years ago • 0 comments

I'm using this code ,and i recive this mensage => TypeError: Cannot read property 'scan' of undefined

what can a do??

import { LANScan } from 'react-native-lanscan'; let lanscan = new LANScan();

lanscan.on('end_pings', () => { let connected_hosts = lanscan.getConnectedHosts(); console.log(connected_hosts); // connected_hosts = ["192.168.1.10", "192.168.1.15"] // if 192.168.1.10 & 192.168.1.15 responded to the pings. }); lanscan.scan(48500, 48503, 100, true, 20, 100);

Eduardo-Maia98 avatar Jun 05 '20 20:06 Eduardo-Maia98