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]