hello,
 using concurrent process i am trying to send data by calling the function 
sockWriteSSL(code given below), most of the time i am unable to send as SSL_write 
return -1.

can anyone tell me how i can pump more data using SSL_write?. any pointers would be of 
great help as i am new to socket programming.i also want to know if SSL_write should 
be called atomically.

static int sockWriteSSL(SSL *ssl,char *str,size_t count)
{
    size_t
        bytesSent=0;

    int
        thisWrite;

    while (bytesSent < count)
    {
       do
          thisWrite=SSL_write(ssl,str,count-bytesSent);
       while ((thisWrite < 0) && (errno == EINTR));

       if (thisWrite <= 0)
        {
         (void) fprintf(stderr,"pid %d unable to write to the socket\n",getpid());
          return (thisWrite);
        }

        bytesSent += thisWrite;
        str += thisWrite;
    }

    return (count);
}
thanks in advance
ganesh

 



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

Reply via email to