use the server in server sample1
client:
- import socket
-
client_s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-
client_s.connect(('10.239.54.70', 8008))
-
-
while 1:
-
data = raw_input('>')
-
client_s.send(data)
-
if not data:
-
break
-
newdata = client_s.recv(1024)
-
print newdata
-
-
clientsocket.close()
# python client.py
>test
Rev: test
阅读(538) | 评论(0) | 转发(0) |