socket problem (send infinite...)

Alberto Vera avera at
Mon Jun 28 17:49:05 CEST 2004

Hello:I found an example to send data using socket.I did a little change for code you can find in: 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 = ''    # 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`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list