| 1248 | } |
| 1249 | |
| 1250 | uint64_t SSU2Server::FindOutgoingToken (const boost::asio::ip::udp::endpoint& ep) |
| 1251 | { |
| 1252 | auto it = m_OutgoingTokens.find (ep); |
| 1253 | if (it != m_OutgoingTokens.end ()) |
| 1254 | { |
| 1255 | if (i2p::util::GetSecondsSinceEpoch () + SSU2_TOKEN_EXPIRATION_THRESHOLD > it->second.second) |
| 1256 | { |
| 1257 | // token expired |
| 1258 | m_OutgoingTokens.erase (it); |
| 1259 | return 0; |
| 1260 | } |
| 1261 | return it->second.first; |
| 1262 | } |
| 1263 | return 0; |
| 1264 | } |
| 1265 | |
| 1266 | uint64_t SSU2Server::GetIncomingToken (const boost::asio::ip::udp::endpoint& ep) |
| 1267 | { |
no test coverage detected