#!/usr/bin/env python
import socket
HOST='192.168.2.110'
PORT='50007'
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect((HOST,PORT))
s.sendall('Hello,world') #发送数据到server端
data= s.recv(1024) #收server端发过来的数据
s.close()
print 'Received',repr(data)
~