[Python-Dev] noreply@sourceforge.net: [Python-bugs-list] [Bug #111620] lots of use of send() without verifyi ng amount of d

Gordon McMillan gmcm@hypernet.com
Fri, 11 Aug 2000 13:38:01 -0400


Thomas Wouters wrote:
> On Fri, Aug 11, 2000 at 09:59:07AM -0700, Sam Rushing wrote:
> 
> > It's a feature of Linux... it will send() everything.  Other
> > unixen act in the classic fashion (it bit me on FreeBSD), and
> > send only what fits right into the buffer that awaits.
...
> > I think this could safely be added to the send method in
> > socketmodule.c.  Linux users wouldn't even notice.  IMHO this
> > is the kind of feature that people come to expect from
> > programming in a HLL. Maybe disable the feature if it's a
> > non-blocking socket?
> 
> Hm, I'm not sure if that's the 'right' thing to do, though
> disabling it for non-blocking sockets is a nice idea. 

It's absolutely vital that it be disabled for non-blocking 
sockets. Otherwise you've just made it into a blocking socket.

With that in place, I would be neutral on the change. I still feel 
that Python is already doing the right thing. The fact that 
everyone misunderstood the man page is not a good reason to 
change Python to match that misreading.

> It
> shouldn't break anything, but it doesn't feel too 'right'. The
> safe option would be to add a function that resends as long as
> necessary, and point everyone to that function. But I'm not sure
> what the name should be -- send is just so obvious ;-) 

I've always thought that was why there was a makefile method.
 


- Gordon