-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTLS threaded read-write with same SSL object #448
Conversation
17476c8
to
7a2a8c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encountered several benign warnings during build.
int main (int argc, char** argv) | ||
{ | ||
/* standard variables used in a dtls client*/ | ||
int n = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client-dtls-rw-threads.c:158:21: warning: unused variable ‘readErr’ [-Wunused-variable]
158 | int readErr;
| ^~~~~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
dtls/client-dtls-rw-threads.c
Outdated
int n = 0; | ||
int sockfd = 0; | ||
int err1; | ||
int readErr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client-dtls-rw-threads.c:158:21: warning: unused variable ‘readErr’ [-Wunused-variable]
158 | int readErr;
| ^~~~~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
dtls/server-dtls-rw-threads.c
Outdated
int on = 1; | ||
int res = 1; | ||
int connfd = 0; | ||
int recvLen = 0; /* length of message */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server-dtls-rw-threads.c:232:19: warning: unused variable ‘recvLen’ [-Wunused-variable]
232 | int recvLen = 0; /* length of message */
| ^~~~~~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
dtls/server-dtls-rw-threads.c
Outdated
threadArgs args; | ||
pthread_t threadidReader; | ||
pthread_t threadidWriter; | ||
pthread_t threadidEnc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
server-dtls-rw-threads.c:242:19: warning: unused variable ‘threadidEnc’ [-Wunused-variable]
242 | pthread_t threadidEnc;
| ^~~~~~~~~~~
(note this var is indeed used when building with -DWOLFSSL_THREADED_CRYPT
, but only then.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Add server and client DTLS example that have read and write threads that use the same SSL objects. Server also has encryption threads when wolfSSL is compiled for that.
7a2a8c5
to
3bb9656
Compare
Add server and client DTLS example that have read and write threads that use the same SSL objects.
Server also has encryption threads when wolfSSL is compiled for that.