Hi Edward, Steve, Problem solved, thank you! :)
Is there any magic numbers like this in socket or openssl libraries, more thanks! Regards Eric ----- Original Message ----- From: "Edward Chan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 27, 2004 5:29 AM Subject: RE: Is server can only accept ssl clients to the limit of 64 on same port, can I enlarge the number, Urgent! Thanks! > I'm not sure why the SSL_accept() is blocking, but on Windows, 64 does seem > to be a magic number for things such as select(). FD_SETSIZE is defined to > 64 in one of the windows header files. I guess if you want a higher limit, > you have to redefine it to something bigger at compile time. Not sure if > this is the problem. > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Dr. > > Stephen Henson > > Sent: Thursday, August 26, 2004 9:20 AM > > To: [EMAIL PROTECTED] > > Subject: Re: Is server can only accept ssl clients to the > > limit of 64 on same port, can I enlarge the number, Urgent! Thanks! > > > > On Thu, Aug 26, 2004, Eric Lai wrote: > > > > > Hi Steve, > > > > > > Thank for your reply! > > > > > > Let me explain my problem: If I tried to connect 100 SSL > > client to my > > > server, only 64 clients can connected, the other 36 clients > > remain in > > > SSL Accepting state (or SSL Accept got blocking). When I > > diconnect 1 > > > of the connected client, 1 of the SSL Accepting client will then > > > connected, and still remain 35 clients accepting. When I > > disconnect > > > more client, the connected clients always be 64. My server always > > > listen to one port say 8080. > > > > > > My logic flow is: > > > > > > Server Init: > > > SSL_load_error_strings(); > > > SSLeay_add_ssl_algorithms(); > > > method = SSLv23_server_method(); > > > server_ctx = SSL_CTX_new(method); > > > SSL_CTX_set_mode(server_ctx, SSL_MODE_ENABLE_PARTIAL_WRITE); > > > SSL_CTX_set_cipher_list(server_ctx, > > "ALL:MEDIUM:!HIGH:!LOW:!IDEA"); > > > SSL_CTX_use_certificate_file(server_ctx, cert_file, > > SSL_FILETYPE_PEM); > > > SSL_CTX_use_PrivateKey_file(server_ctx, key_file, > > > SSL_FILETYPE_PEM); > > > > > > Server Accept: (the sockets are set to non-blocking mode) > > > client_socket = accept(..); > > > client_ssl = SSL_new(server_ctx); > > > SSL_set_fd(client_ssl, client_socket); > > > SSL_accept(client_ssl); // <- then got blocking after 64 clients > > > (loop SSL_accept() for each client until connected state is > > > detected) > > > > > > > > > What's wrong in my logic? Any more initialization missing? > > And how to > > > connect more clients, thank you! > > > > > > > I wonder if this is a restriction on the platform you are > > using, such as a file descriptor limit or a problem with > > select() [see recent thread]. Are you attempting to > > communicate with all clients in the same process? > > > > Steve. > > -- > > Dr Stephen N. Henson. Email, S/MIME and PGP keys: see > > homepage OpenSSL project core developer and freelance consultant. > > Funding needed! Details on homepage. > > Homepage: http://www.drh-consultancy.demon.co.uk > > ______________________________________________________________________ > > OpenSSL Project http://www.openssl.org > > User Support Mailing List [EMAIL PROTECTED] > > Automated List Manager [EMAIL PROTECTED] > > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List [EMAIL PROTECTED] > Automated List Manager [EMAIL PROTECTED] > > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
