测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布上次发布 | 2016 年 10 月 |
SwiftSwift 版本 | 3.0 |
由 Chris Anderson 维护。
轻松扫描 Wi-Fi 网络中的设备
let scanner = LANScanner(delegate: self, continuous: false)
scanner?.startScan()
确保实现 LANScannerDelegate 协议
var netInfo = LANScanner.getLocalAddress()
print(netInfo.ip)
print(netInfo.netmask)
/// Public
var delegate:LANScannerDelegate // Delegate for discovery callbacks
var continuous:Bool // When set this will restart the scan when completed
func startScan() // Begin a scan
func stopScan() // End a scan
static func getHostName(ipaddress: String) -> String? // Get the hostname from an IP address
static func getLocalAddress() -> NetInfo? // Get the local devices IP address and
/// Delegate
func LANScannerDiscovery(device: LANDevice)
func LANScannerFinished()
func LANScannerRestarted()
func LANScannerFailed(error: NSError)
Chris Anderson
LANScanner 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。