| 3434 | } |
| 3435 | |
| 3436 | void SSU2Session::FlushData () |
| 3437 | { |
| 3438 | bool sent = SendQueue (); // if we have something to send |
| 3439 | if (sent) |
| 3440 | SetSendQueueSize (m_SendQueue.size ()); |
| 3441 | if (m_IsDataReceived) |
| 3442 | { |
| 3443 | if (!sent) SendQuickAck (); |
| 3444 | m_Handler.Flush (); |
| 3445 | m_IsDataReceived = false; |
| 3446 | } |
| 3447 | else if (!sent && !m_SentPackets.empty ()) // if only acks received, nothing sent and we still have something to resend |
| 3448 | Resend (i2p::util::GetMillisecondsSinceEpoch ()); // than right time to resend |
| 3449 | } |
| 3450 | |
| 3451 | i2p::data::RouterInfo::SupportedTransports SSU2Session::GetTransportType () const |
| 3452 | { |
no test coverage detected