mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-31 06:59:32 +00:00
Set udp interface for iOS rc
This commit is contained in:
@@ -36,6 +36,10 @@ class ViewController: UIViewController, WKScriptMessageHandler {
|
||||
|
||||
// Setup UDP broadcasting
|
||||
udpSocket.enableBroadcast()
|
||||
|
||||
// Set UDP broadcasting interface
|
||||
var wifiInterface = if_nametoindex("en0");
|
||||
setsockopt(udpSocket.fd!, IPPROTO_IP, IP_BOUND_IF, &wifiInterface, socklen_t(MemoryLayout<UInt32>.size));
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
|
||||
Reference in New Issue
Block a user