Transports returned by ParticipantConfig::getTransports() should be mutable
ParticipantConfig::getTransports() returns a
std::set of deep-copied
ParticipantConfig::Transport objects. As elements of a
std::set, these objects are immutable which prevents the idiom
std::set<ParticipantConfig::Transport> transports = config.getTransports() // modify transports config.setTransports(transports);
#1 Updated by J. Wienke over 7 years ago
I don't think this is easily possible, because internally we manage a map from name to transport class for checking duplicated transports. Exposing this map sounds dangerous to me and too complicated for the user.
However, the whole assumption that a single transport must appear only a single time might be wrong already. It could be perfectly valid to have two distinct socket transports running on different ports. I don't know how we should proceed here.