Mail Archives: cygwin/2001/07/16/03:54:10
On Sun, Jul 15, 2001 at 10:52:20PM -0400, Jonathan Kamens wrote:
> > Date: Fri, 13 Jul 2001 20:21:46 -0400
> > From: Christopher Faylor <cgf AT redhat DOT com>
> >
> > Thanks for the diagnosis. Would you be willing to look at the
> > Cygwin socket code and suggest a fix?
>
> In yet another astounding piece of Windows brain-damage, the
> *documented* behavior of the Winsock closesocket call is that any data
> written to the socket that hasn't been read by the other end is lost,
> and thus a client *must* call shutdown on a socket before closing it
> to ensure that all data is transmitted to the other end. The
Thanks for figuring that out. I would be very interested in this
piece of documentation. Could you give me a pointer?
The problem is, from what I read so far (which is basically the MSDN)
the default behaviour on closing a socket is to perform a graceful
shutdown with immediate return of the `closesocket' function (linger
"off"). I just have that page "Graceful Shutdown, Linger Options, and
Socket Closure" inside of MSDN, that's all.
Since Microsoft at least claims that linger "off" is a valid and
settable state, shouldn't we try a very simple solution first?
We could change the Cygwin internal `socket' function so that
we don't rely on the linger setting but set linger "off" explicitely
after the socket() call. We could even set it explicitely in
a WSADuplicateSocket/WSASocket action on fork.
Comments?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin AT cygwin DOT com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -