A
Alberto Vera
Hello:I found an example to send data using socket.I did a little change for code you can find in: http://www.python.org/doc/current/lib/socket-example.htmlI want to send a lot of Hello World, but after few seconds I didn't see any new "Hello World" Client side sends 3577 "Hello World" and Server side shows 1800 "Hello World" Could you tell me How I can improve this?Thanks...# Echo client program
import socket
HOST = 'daring.cwi.nl' # The remote host
PORT = 50007 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))#changes!!!j=0while 1: info1 = "*Hello World=\'%s\'"%(str(j))
s.send(info1) j+=1
data = s.recv(1024)s.close()
print 'Received', `data`
import socket
HOST = 'daring.cwi.nl' # The remote host
PORT = 50007 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))#changes!!!j=0while 1: info1 = "*Hello World=\'%s\'"%(str(j))
s.send(info1) j+=1
data = s.recv(1024)s.close()
print 'Received', `data`