cinap_lenrekadd hg and python4bb9e2215 years agoHistory
15 lines · 283 B · Python
RawDownload
# Send UDP broadcast packets MYPORT = 50000 import sys, timefrom socket import * s = socket(AF_INET, SOCK_DGRAM)s.bind(('', 0))s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) while 1:    data = repr(time.time()) + '\n'    s.sendto(data, ('<broadcast>', MYPORT))    time.sleep(2)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t