Socket Performance
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sat Mar 15 04:33:30 EDT 2008
En Thu, 13 Mar 2008 15:18:44 -0200, <sleddd at gmail.com> escribió:
> Well, lets say you have a situation where you're going to be
> alternating between sending large and small chunks of data. Is the
> solution to create a NetworkBuffer class and only call send when the
> buffer is full, always recv(8192)?
No need to reinvent the wheel. socket objects already have a makefile
method returning a file-like object, which behaves like a buffered socket.
--
Gabriel Genellina
More information about the Python-list
mailing list