| 535 | } |
| 536 | |
| 537 | void NetworkThread::asyncSendPendingMsg(EndPoint *ep) { |
| 538 | // simply put the pending msgs to the send queue |
| 539 | |
| 540 | LOG(INFO) << "There are " << ep->send_.size() << " to-send msgs, and " |
| 541 | << ep->to_ack_.size() << " to-ack msgs"; |
| 542 | |
| 543 | if (!ep->to_ack_.empty()) { |
| 544 | while (!ep->send_.empty()) { |
| 545 | ep->to_ack_.push(ep->send_.front()); |
| 546 | ep->send_.pop(); |
| 547 | } |
| 548 | std::swap(ep->send_, ep->to_ack_); |
| 549 | } |
| 550 | |
| 551 | if (ep->send_.size() > 0) { |
| 552 | notify(SIG_MSG); |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | /** |
| 557 | * @brief non-locking send; |
no test coverage detected