Socket Performance

castironpi at gmail.com castironpi at gmail.com
Sat Mar 15 05:00:44 EDT 2008


On Mar 15, 3:33 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Thu, 13 Mar 2008 15:18:44 -0200, <sle... 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.

Newbie question:  Can you write to the 'file-like object' a pickle,
and receive it intact-- as one string with nothing else?

I want to know because I want to send two pickles.



More information about the Python-list mailing list