]> git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unicast.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Demo / sockets / unicast.py
1 # Send UDP broadcast packets
2
3 MYPORT = 50000
4
5 import sys, time
6 from socket import *
7
8 s = socket(AF_INET, SOCK_DGRAM)
9 s.bind(('', 0))
10
11 while 1:
12 data = repr(time.time()) + '\n'
13 s.sendto(data, ('', MYPORT))
14 time.sleep(2)