| 210 | } |
| 211 | |
| 212 | void Sender::boundQueue(Queue* q, std::string qn) { |
| 213 | DOUT(std::cerr << "Sender: " << this << " bound to Queue: " << q <<"(" << qn << ")\n";); |
| 214 | queue_ = q; |
| 215 | queue_name_ = qn; |
| 216 | |
| 217 | sender_.open(proton::sender_options() |
| 218 | .source((proton::source_options().address(queue_name_))) |
| 219 | .handler(*this)); |
| 220 | auto credit = pending_credit_; |
| 221 | q->add([=]{ |
| 222 | q->subscribe(this); |
| 223 | if (credit>0) { |
| 224 | q->flow(this, credit); |
| 225 | } |
| 226 | }); |
| 227 | std::cout << "sending from " << queue_name_ << std::endl; |
| 228 | } |
| 229 | |
| 230 | class QueueManager; |
| 231 |
no test coverage detected