Decouple modules regarding event dispatching
Module dispatching from a module to another is currently hard coded in S2OPC, for example sockets tell explicitly to secure channels that some bytes were received. This is not a great architectural practice, and makes testing more complicated than it needs to be.
Implement a "listener" mechanism where a module can listen to the events of another one (for example, secure channels listen to sockets), and adapt the current event dispatcher so that various event sources can be watched (listened to) from a same thread.