Added 'list_only' option (and modified 'run()' to respect it).
[python/dscho.git] / Demo / sockets / unicast.py
blob1e9caebd2ac4820598767d8f3eb42eb23795bd7c
1 # Send UDP broadcast packets
3 MYPORT = 50000
5 import sys, time
6 from socket import *
8 s = socket(AF_INET, SOCK_DGRAM)
9 s.bind(('', 0))
11 while 1:
12 data = `time.time()` + '\n'
13 s.sendto(data, ('', MYPORT))
14 time.sleep(2)