Skip to content

C++: Improvements to BasePool/SubscriberPool

Simon Spannagel requested to merge p-subscriber-improvements into main

My work on a logger has sparked some necessary improvements to the pools:

  • returning a const std::map of sockets from BasePool doesn't allow you to do anything with the sockets because they always change (e.g. set an option).
  • the nice subscribe and unsubscribe methods consequently didn't work, didn't even compile which only works because the template is not used anywhere (yet)
  • it turns out that setting a fixed list of topics to subscribe to at startup is too restrictive. I now allow providing a lambda that generates the topics at the time a socket joins.

Merge request reports