Re: Winsock2 accept queue depth
From: Arkady Frenkel (arkadyf_at_hotmailxdotxcom)
Date: 11/30/04
- Previous message: venAdder: "problem with WNetAddConnection2 and WNetCancelConnection2!!! :("
- In reply to: Alun Jones [MSFT]: "Re: Winsock2 accept queue depth"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Nov 2004 22:02:28 +0200
Steve , just be aware that backlog is stack of not yet accepted connections
on server ( between listen() and accept() , but number of accepted (
established ) sockets limited only by memory resources and only in 9x that
limited to 100
Arkady
"Alun Jones [MSFT]" <alunj@online.microsoft.com> wrote in message
news:u48HiFw1EHA.2112@TK2MSFTNGP15.phx.gbl...
> "Steve Tassio" <SteveTassio@discussions.microsoft.com> wrote in message
> news:F7C44AE1-D480-400D-BE3E-5552F3384742@microsoft.com...
> > For a long time SOMAXCONN = 5. In Winsock2.h its defined as 0x7fffffff.
I
> > have a listening socket in a thread to accept connections to an array of
> > working sockets that run in their own threads. Using XP SP1, .NET 2003,
> > MFC
> > C++. I found SOMAXCONN to still be = 5. I dragged Winsock2.h and
> > WS2_32.lib
> > from the Feb 04 Platform SDK into my project and still find SOMAXCONN =
5.
> > I
> > tried this -
> > #define SOMAXCONN 0x7fffffff
> > but my symptoms don't go away. They are, if I try to spawn over 70
threads
> > that connect to the accept socket I get many of this error -
> > WSAECONNREFUSED - 10061
> > The socket array has 200 available sockets and each thread is probably
> > active about 120ms only. Ultimately I need to sustain 250 simultaneous
> > connections. Is there a work around for this? Thank you!
>
> Workstation-class operating systems are limited to a backlog of 5,
> server-class operating systems (Windows 2003 Server, Windows Server 2000,
> Windows NT 4 Server, etc) have different limits on the backlog.
>
> Alun.
> ~~~~
>
>
- Previous message: venAdder: "problem with WNetAddConnection2 and WNetCancelConnection2!!! :("
- In reply to: Alun Jones [MSFT]: "Re: Winsock2 accept queue depth"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|