Sign in
android
/
device
/
linaro
/
hikey
/
82c8071
/
.
/
uefi
/
linaro-edk2
/
AppPkg
/
Applications
/
Python
/
Python-2.7.2
/
Demo
/
sockets
/
unixclient.py
blob: 369e225f4e3caf93aa87feb631cae9418140fcd8 [
file
] [
log
] [
blame
]
# Echo client demo using Unix sockets
# Piet van Oostrum
from
socket
import
*
FILE
=
'unix-socket'
s
=
socket
(
AF_UNIX
,
SOCK_STREAM
)
s
.
connect
(
FILE
)
s
.
send
(
'Hello, world'
)
data
=
s
.
recv
(
1024
)
s
.
close
()
print
'Received'
,
repr
(
data
)