64K socket send limit

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Mar 27 17:10:00 GMT 2008

On Mar 27 11:07, Brian Ford wrote:
> I'm concerned that while the following change may be standards compliant,
> it may also break a lot of legacy applications that have not been coded
> portably enough to handle it gracefully.

I'm not that concerned and if we actually get problems we have yet time
enough to change the code.  However, having said that...

> To avoid a partial send surprise for blocking TCP legacy applications, I
> suggest Cygwin use an internal 64K chunk loop to complete the full buffer
> send if possible, only returning a shorted value if an error occurs during
> the loop iteration.  The current behavior is probably fine, however, for
> UDP and non-blocking sends.
> I suggest something similar to, but more optimal that the following:
> http://support.microsoft.com/kb/227672
> Please let me know if I've entirely missed something here as I haven't
> done anything more than inspect the code to come to my conclusion.
> Comments?

You're not missing something, except for


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-developers mailing list