| 60 | } |
| 61 | |
| 62 | void on_message(proton::delivery&, proton::message& m) override { |
| 63 | std::cout << "Received " << m.body() << std::endl; |
| 64 | |
| 65 | std::string reply_to = m.reply_to(); |
| 66 | proton::message reply; |
| 67 | |
| 68 | reply.to(reply_to); |
| 69 | reply.body(to_upper(proton::get<std::string>(m.body()))); |
| 70 | reply.correlation_id(m.correlation_id()); |
| 71 | |
| 72 | if (!senders_[reply_to]) { |
| 73 | senders_[reply_to] = conn_.open_sender(reply_to); |
| 74 | } |
| 75 | |
| 76 | senders_[reply_to].send(reply); |
| 77 | } |
| 78 | }; |
| 79 | |
| 80 | int main(int argc, char** argv) { |
nothing calls this directly
no test coverage detected