cinap_lenrekadd hg and python4bb9e2215 years agoHistory
14 lines · 287 B · Python
RawDownload
# Receive UDP packets transmitted by a broadcasting service MYPORT = 50000 import sysfrom socket import * s = socket(AF_INET, SOCK_DGRAM)s.bind(('', MYPORT)) while 1:    data, wherefrom = s.recvfrom(1500, 0)    sys.stderr.write(repr(wherefrom) + '\n')    sys.stdout.write(data)

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