Topic: multithreading with sniffer application - [suggested bug and fix]
Hey all,
I monitor my own server and use the wolfSSL embedded ssl sniffer application using my server's private key. I register my server using ssl_setPrivateKey and do this only once (since i have only one server i monior). then, I call ssl_decodePacket for each packet. everything works just fine. recently, I tried to multithread the sniffer - I spawn some threads and call ssl_decodePacket from multiple threads. as far as i can see, the session table is thread safe, and it seems the application as a whole is built for it. however, I seem to crush when I ssl_decodePacket in a multithreaded fashion. I suspect it has to do with the fact that all the sessions to my server are using the same SnifferServer object, although, as I imagine, that has to be the case since I have only one server, accepting traffic on port 443.
I know SnifferServer is not being freed, this isn't the problem - I know it's quite general, but, any ideas?
sure, I can use the program with one thread, but I find the multithreaded version much faster to go over large data sets.
thanks,
Dan