TCP problems

Conrad Scott Conrad.Scott@dsl.pipex.com
Mon Jul 29 15:20:00 GMT 2002


"Pierre A. Humblet" <Pierre.Humblet@ieee.org> wrote:
> > I'll try some more combinations, but interestingly I can't
> > recreate this with my direct winsock2 server: linger or not it
> > runs forever too.  I'll try some more combinations.
>
> Weird. Cygwin also makes direct Windows calls. There must be
> a slight difference.

And it's that damn difference I'm searching for: the only thing
that pops to mind at the moment is that cygwin puts the socket
into non-blocking mode, w/ WSAEventSelect, in
fhandler_socket::accept.  I'll try cooking up a native winsock2
server that does that too.

> > Another strangeness I'm getting is that if I run netstat -a on
my
> > win98/SE box, it never shows more than 10 connections (e.g.
one
> > LISTENING and nine, the most recent nine port numbers, in
> > TIME_WAIT).  This is regardless of the other changes I've
> > described.  There must be more ports in TIME_WAIT than that
> > (especially with the linger setting in cygwin) so what's up?
Is
> > netstat known to be dodgy on win98?
>
> Not that I know of.
> Note that netstat is showing you connections, not sockets in
use.
> They are different. E.g. with shutdown () the connections are
gone
> but you can get WSAENOBUFS, indicating the sockets are still
using
> space.

I thought netstat showed ports in use: e.g., ports that are in
TIME_WAIT w/o being connected to anything are normally shown after
you've quit the applications using them?  In any case, for me it's
showing nine TIME_WAIT ports when the server and client each only
have one connection open at any time.  On my win2k box, it always
shows at most 1000 ports in TIME_WAIT state, regardless of how
many I've just been using.  There must be a limit somewhere here.

For the moment,

// Conrad





More information about the Cygwin-developers mailing list