Open B3n30 opened 7 years ago
I refactored the callbacks for our tunnler. I looked in the boost::signal2 code and used that as a template for our signal handling.
I tested it and it works. So I'm happy with it now. It is thread safes, allows for multiple callbacks for one event type, and you only need to connect to it with std::bind().
A later commit will be to add all the Connect'EventType'(std::function<void()>) for every EventType which will internally just link to Connect(std::function<void()>, EventType) as @JayFoxRox suggested.
So all in all I would love if this goes from RFC to a full PR
I don't even know which commits to review, please squash and tell us which code to review or which code might be from other branches [do we still have to review? do we have to merge another PR first?]
Sorry the commits got a bit messy. I removed all the prior attempts for signals and only put the most recent design in this PR
this implements Event handling in tunnler.