repo.or.cz
/
python
/
dscho.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix an amazing number of typos & malformed sentences reported by Detlef
[python/dscho.git]
/
Demo
/
sockets
/
unixclient.py
blob
a0d80f608317607e6a18c78c8a7f357ef35cef3b
1
# Echo client demo using Unix sockets
2
# Piet van Oostrum
3
from
socket
import
*
4
FILE
=
'blabla'
5
s
=
socket
(
AF_UNIX
,
SOCK_STREAM
)
6
s
.
connect
(
FILE
)
7
s
.
send
(
'Hello, world'
)
8
data
=
s
.
recv
(
1024
)
9
s
.
close
()
10
print
'Received'
,
`data`