Steve Tassio
2004-11-30 16:05:01 UTC
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!
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!