Python中socket的运用(构建客户端)
#!/usr/bin/env python
#coding=UTF-8
#Python Socket client端的构建
#Author www.PHPdesigner.org Time:2010-07-23 13:35
#Application-Language:Python2.x
import socket
client = socket.socket()
server = socket.gethostname()
port = 1987
client.connect((server,port))
print client.recv(1024)
client.close()