Hi all quick question of you guru's.

If I wish to check to see if data is ready to be read on my SSL connection
do I just use normal "select" or is there something in the SSL libraries
that I need to use?

I normally use the function below:

int CheckRead(SOCKET socket)
{
        struct timeval stTimeOut;
        fd_set stReadFDS;
        fd_set stErrorFDS;

        FD_ZERO(&stReadFDS);
        FD_ZERO(&stErrorFDS);

        FD_SET(socket,&stReadFDS);
        FD_SET(socket,&stErrorFDS);

        stTimeOut.tv_sec=0;
        stTimeOut.tv_usec=0;

        int i;
        i = select(0,&stReadFDS,NULL,&stErrorFDS,&stTimeOut);
        if (i)
        {
                if (FD_ISSET(socket,&stReadFDS))
                        return 1;
        }
        return 0;
}


Thanks!
Pj.

 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 267.3.0 - Release Date: 30/05/2005
 

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to