mirror of https://github.com/wolfSSL/wolfssl.git
Fix TCP with Timeout
Updated example client and server to use the new wolfSSL_dtls_set_using_nonblock() function.pull/1566/head
parent
b1ed852f36
commit
0315b378f5
|
@ -2075,7 +2075,11 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||
wolfSSL_check_domain_name(ssl, domain);
|
||||
#ifndef WOLFSSL_CALLBACKS
|
||||
if (nonBlocking) {
|
||||
wolfSSL_set_using_nonblock(ssl, 1);
|
||||
#ifdef WOLFSSL_DTLS
|
||||
if (doDTLS) {
|
||||
wolfSSL_dtls_set_using_nonblock(ssl, 1);
|
||||
}
|
||||
#endif
|
||||
tcp_set_nonblocking(&sockfd);
|
||||
ret = NonBlockingSSL_Connect(ssl);
|
||||
}
|
||||
|
@ -2328,7 +2332,11 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||
|
||||
#ifndef WOLFSSL_CALLBACKS
|
||||
if (nonBlocking) {
|
||||
wolfSSL_set_using_nonblock(sslResume, 1);
|
||||
#ifdef WOLFSSL_DTLS
|
||||
if (doDTLS) {
|
||||
wolfSSL_dtls_set_using_nonblock(ssl, 1);
|
||||
}
|
||||
#endif
|
||||
tcp_set_nonblocking(&sockfd);
|
||||
ret = NonBlockingSSL_Connect(sslResume);
|
||||
}
|
||||
|
|
|
@ -1426,7 +1426,11 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
|||
|
||||
#ifndef CYASSL_CALLBACKS
|
||||
if (nonBlocking) {
|
||||
CyaSSL_set_using_nonblock(ssl, 1);
|
||||
#ifdef WOLFSSL_DTLS
|
||||
if (doDTLS) {
|
||||
wolfSSL_dtls_set_using_nonblock(ssl, 1);
|
||||
}
|
||||
#endif
|
||||
tcp_set_nonblocking(&clientfd);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue