/LanScanner

Primary LanguageObjective-C

LanScanner

Using in Swift:

Import

import SwiftLanScanner
import Combine

Code

Start, Stop Scan Device

SwiftLanScanner.start()
SwiftLanScanner.stop()

Get List Device In Lan

SwiftLanScanner.listDevice.sink { list in
            list.forEach {
                print("IP: \($0.ipAddress ?? "") Brand: \($0.brand ?? "")")
            }
        }.store(in: &cancellable)

Progress

SwiftLanScanner.progress.sink { p in
            print("Progress: \(p)")
        }.store(in: &cancellable)