Originally Posted by
Cactus_Hugger
Except you posted no code, so the most I could tell was that maybe you were creating 200k sockets.
handled individually all 200k+ sockets operate normally. Using select it is possible to have at least 32k sockets in a single fd_set. It fails with 64k, but I did not test numbers larger than 32k.
Code:
for(int x = 0;x<FD_SETSIZE;x++){
SocketSet.fd_array[x] = socket(AF_INET , SOCK_STREAM , IPPROTO_TCP);
if(SocketSet.fd_array[x] == INVALID_SOCKET){
printf("Failure at socket#%d\n" , x);
fdsetsize = x;
x = FD_SETSIZE;
}
}
SocketSet.fd_count = fdsetsize;
timeval Time;
Time.tv_sec = 5;
Time.tv_usec = 0;
err = select( 0 , &SocketSet , NULL , NULL , &Time);
but i agree select is a poor method for workign with large numbers of sockets. WSAAsyncSelect or WSAEventSelect are the preferred methods.