Title: SSL_read blocks the control - urgent

hello
i am trying to read some data from my web server , but my control never returns after SSL_read(....)  though the SSL_write works fine.

any suggestions

my code is something like this:
        // send the http request
        char* req = new char[strlen(pageReq) + 7];
        sprintf(req, "GET /%s\n", pageReq);
        int ret = SSL_write(m_pSSL,req,strlen(req));
        if(ret == SOCKET_ERROR)
                return 0x00;

        // get the response
        int num = 0;
        data = new char[MAX_DATA];
        int index = 0;
        char response;
        while(1)
        {
                num = SSL_read(m_pSSL,&response,1);
                if(num == SOCKET_ERROR)
                        return 0x00;
                if(num == 0)
                        break;
                data[index++] = response;
        }



Meenakshi Arora
Software Engineer
Red Creek Communications.
email:[EMAIL PROTECTED]

Reply via email to