On Apr 28 19:44, Charles Wilson wrote: > Charles Wilson wrote: > >> Yeah, I'll code that up for 1.5-4. Should I stick with BUFSIZ == 1024, or >> when MMAP use something a little bigger, say 32k? > > Also, uploads to the server seem to be sane (e.g. read() from the server > side). So it's just downloads to the client when HAVE_MMAP. The fix was > pretty easy: > > #ifdef HAVE_MMAP > #include <sys/mman.h> > +# ifdef __CYGWIN__ > + /* On cygwin, network transfers are limited to an absolute > + maximum of 64k, or transfer fails with ENOBUFS. Conservative: */ > +# define LARGE_TRANSFER_LIMIT 32768 > +# endif > #endif
In theory that looks fine, I just don't like the comment. This is not Cygwin's fault in the first place and it's not Cygwin returning ENOBUFS when you use too big send calls in the first place. Also, Cygwin does not return ENOBUFS for writes > 64K. The 1.5 versions lets you do what you want and you have to deal with Winsock's behaviour directly. The 1.7 version just sends a maximum of 64K regardless of the incoming buffer size. It doesn't refuse the write completely. Eventually we should do our own write buffer management in Cygwin so you won't have to care. Brian Ford is looking into it, afaik. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/