| 1549 | } |
| 1550 | |
| 1551 | void NTCP2Session::MoveSendQueue (std::shared_ptr<NTCP2Session> other) |
| 1552 | { |
| 1553 | if (!other || m_SendQueue.empty ()) return; |
| 1554 | std::list<std::shared_ptr<I2NPMessage> > msgs; |
| 1555 | auto ts = i2p::util::GetMillisecondsSinceEpoch (); |
| 1556 | for (auto it: m_SendQueue) |
| 1557 | if (!it->IsExpired (ts)) |
| 1558 | msgs.push_back (it); |
| 1559 | else |
| 1560 | it->Drop (); |
| 1561 | m_SendQueue.clear (); |
| 1562 | if (!msgs.empty ()) |
| 1563 | other->SendI2NPMessages (msgs); |
| 1564 | } |
| 1565 | |
| 1566 | size_t NTCP2Session::CreatePaddingBlock (size_t msgLen, uint8_t * buf, size_t len) |
| 1567 | { |
no test coverage detected