コード例 #1
0
 // called via work_queue
 void receive_done() {
     // Add 1 credit, a receiver has taken a message out of the buffer.
     receiver_.add_credit(1);
 }
コード例 #2
0
 void on_receiver_open(proton::receiver& r) override {
     receiver_ = r;
     std::lock_guard<std::mutex> l(lock_);
     work_queue_ = &receiver_.work_queue();
     receiver_.add_credit(MAX_BUFFER); // Buffer is empty, initial credit is the limit
 }