Hi,
I would like to issue a timeout on ssl_read and ssl_write after a few seconds.
is there a api for this in non-blocking way.
Thanks
Paul
SSL_READ and SSL_WRITE with timeouts non-blocking
Re: SSL_READ and SSL_WRITE with timeouts non-blocking
Hi, I use this to set my ssl connection to non-blocking.
SSL_get_fd(1) is from openssl/ssl.h
fcntl(3) is from lwip/sockets.h see lwip_fcntl
SSL_get_fd(1) is from openssl/ssl.h
fcntl(3) is from lwip/sockets.h see lwip_fcntl
Code: Select all
//non-blocking connection
int fd = SSL_get_fd(_ssl);
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
SSL_set_fd(_ssl, fd);
Re: SSL_READ and SSL_WRITE with timeouts non-blocking
Thank you for the information.
I will try to run some code using this.
I will try to run some code using this.
Who is online
Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 135 guests