Minor fix for currentframe (SF #1652788).
[python.git] / Demo / sockets / unicast.py
blobdd15e3c7b98fdd2b8b4c75d5f568b30c99d2fbba
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 = repr(time.time()) + '\n'
13 s.sendto(data, ('', MYPORT))
14 time.sleep(2)