mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[network] Modify iOS port knock to use a valid mDNS packet (#17687)
Signed-off-by: Neil Greatorex <neil@greatorex.me.uk>
This commit is contained in:
parent
5d20cba182
commit
cd099cceef
@ -446,7 +446,8 @@ public class NetworkUtils {
|
||||
public void wakeUpIOS(InetAddress address) throws IOException {
|
||||
int port = 5353;
|
||||
try (DatagramSocket s = new DatagramSocket()) {
|
||||
byte[] buffer = new byte[0];
|
||||
// Send a valid mDNS packet (12 bytes of zeroes)
|
||||
byte[] buffer = new byte[12];
|
||||
s.send(new DatagramPacket(buffer, buffer.length, address, port));
|
||||
logger.trace("Sent packet to {}:{} to wake up iOS device", address, port);
|
||||
} catch (PortUnreachableException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user