Sign in
qemu
/
edk2
/
22ec06c8aaa1c4023bb7f960746da57f1b648568
/
.
/
AppPkg
/
Applications
/
Python
/
Python-2.7.2
/
Demo
/
sockets
/
unicast.py
blob: 9d36f45f979d498f0dd91a77eed2c9e1e6462d36 [
file
] [
log
] [
blame
]
# Send UDP broadcast packets
MYPORT
=
50000
import
sys
,
time
from
socket
import
*
s
=
socket
(
AF_INET
,
SOCK_DGRAM
)
s
.
bind
((
''
,
0
))
while
1
:
data
=
repr
(
time
.
time
())
+
'\n'
s
.
sendto
(
data
,
(
''
,
MYPORT
))
time
.
sleep
(
2
)