HOME
FAQ
DOCS
DOWNLOAD
Search:
Login
Preferences
Forgot your password?
Register
Wiki
Timeline
Roadmap
Browse Source
View Tickets
Search
Context Navigation
Back to Ticket #837
Ticket #837
: openSocketChild.py
File openSocketChild.py,
314 bytes
(added by stefanomasini,
8 years
ago)
Line
1
2
# Echo client program
3
import
socket
4
5
HOST
=
'localhost'
# The remote host
6
PORT
=
50007
# The same port as used by the server
7
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
8
s
.
connect
((
HOST
,
PORT
))
9
s
.
send
(
'Hello, world'
)
10
data
=
s
.
recv
(
1024
)
11
s
.
close
()
12
print
'Received'
,
repr
(
data
)
Download in other formats:
Original Format