import sysfrom socket import *serverHost = 'localhost'serverPort = 50008message = ['Client Message1', 'Client Message2']sSock = socket(AF_INET, SOCK_STREAM)sSock.connect((serverHost, serverPort))for item in message: sSock.send(item) data = sSock.recv(1024) print 'Client received: ', 'data'sSock.close()
Name (required)
email (will not be published) (required)
Website