Amount of data that can be transfered between a client and a server.

Jason Orendorff jason at
Sun Jan 6 20:11:49 CET 2002

> I know that there is a way of doing it, but i dont know how. the server
> dosnt tell me how much data it is going to send. could you please help me
> with this kind of problem.

from socket import *

s = socket(AF_INET, SOCK_STREAM)
s.connect(("", 5040))
f = s.makefile('rb')
data =

print "read %d bytes of data:" % len(data)
print repr(data)

## Jason Orendorff

More information about the Python-list mailing list