Skip to content

Instantly share code, notes, and snippets.

@DesignA-Electronics
DesignA-Electronics / network-keep-alive.py
Last active December 16, 2018 21:34
Python example of UDP Broadcast packet transmission
#!/usr/bin/env python
import socket
import time
if __name__ == '__main__':
UDP_IP = "10.255.255.255"
UDP_PORT = 12345
MESSAGE = "KEEP ALIVE"
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)