| 53 | } |
| 54 | |
| 55 | void deliver(const chat_message& msg) |
| 56 | { |
| 57 | recent_msgs_.push_back(msg); |
| 58 | while (recent_msgs_.size() > max_recent_msgs) |
| 59 | recent_msgs_.pop_front(); |
| 60 | |
| 61 | for (auto participant: participants_) |
| 62 | participant->deliver(msg); |
| 63 | } |
| 64 | |
| 65 | private: |
| 66 | std::set<chat_participant_ptr> participants_; |
no test coverage detected