Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

react-native wifiye bağlı olan cihazları listelemek (ip ve mac) [closed]

$
0
0

Merhaba,React-native ile wifiye bağlı cihazları (IP ve MAC adreslerini) listelemek istiyorum. Bunun için hangi paketi kullanmam gerekiyor ? react-native-lan-port-scanner kullanmaya çalıştım fakat typescript olduğu için hata alıp çalıştıramadım yardımcı olur musunuz ?

https://www.npmjs.com/package/react-native-find-local-devices/v/1.3.4

Yapmak istediğim uygulamanın bilgisayar versiyonu:https://miloserdov.org/wp-content/uploads/2020/06/ipscan-2.png

import LanPortScanner, { LSConfig }  from 'react-native-lan-port-scanner';//Returns `LSNetworkInfo` const networkInfo = await LanPortScanner.getNetworkInfo() let config: LSConfig = {   networkInfo: networkInfo,   ports: [80, 8085], //Specify port here   timeout: 1000, //Timeout for each thread in ms   threads: 150 //Number of threads } LanPortScanner.startScan(config, (totalHosts: number, hostScanned: number) => {   console.log(hostScanned / totalHosts) //Show progress }, (result) => {   console.log(result) //This will call after new ip/port found. }, (results) => {   console.log(results) // This will call after scan end. })

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>