| 59 | } |
| 60 | |
| 61 | void receiver::add_credit(uint32_t credit) { |
| 62 | link_context &ctx = link_context::get(pn_object()); |
| 63 | if (ctx.draining) |
| 64 | ctx.pending_credit += credit; |
| 65 | else |
| 66 | pn_link_flow(pn_object(), credit); |
| 67 | } |
| 68 | |
| 69 | void receiver::drain() { |
| 70 | link_context &ctx = link_context::get(pn_object()); |