I am trying to make a threaded SSL web proxy. It listen on a
port. Recives unencrypted conections. And then forwards them onto the
internet.
But i have meet with a problem. This code fragment of my
inner loop higlights it:
for(;;){
if (BIO_do_accept(sock) <= 0){
ERR_print_errors_fp(stderr);
break;
}
BIO_read(sock,&in,0);
//Create a new thread that starts in the work function with
//sock as a parameter
pthread_create(&thr,NULL,work,(void*)sock);
}
This ends in both BIO_do_accept and work use'ing the same BIO, wich is
of course not what i want. But what to do i need to do to make it
work? (Is there something like the BSD accept function call in
SSLeay?) Or is my design flawed?
--
"I never knew anyone who understood my innermost feeling the way you
do." He looked at her affectionaly." "How do you do it?" "I have
infrared scanners," she said "I read the pattern of blood flow in your
face." Bruce Sterling Twenty Evocations
+-------------------------------------------------------------------------+
| Administrative requests should be sent to [EMAIL PROTECTED] |
| List service provided by Open Software Associates, http://www.osa.com/ |
+-------------------------------------------------------------------------+