| 80 | } |
| 81 | |
| 82 | bool tcp_keeper::direct(const char* addr, bool& found) |
| 83 | { |
| 84 | std::map<std::string, double>::iterator it; |
| 85 | thread_mutex_guard guard(*lock_); |
| 86 | it = addrs_.find(addr); |
| 87 | if (it == addrs_.end()) { |
| 88 | found = false; |
| 89 | return false; |
| 90 | } |
| 91 | |
| 92 | found = true; |
| 93 | return it->second <= rtt_min_; |
| 94 | } |
| 95 | |
| 96 | void tcp_keeper::remove(const char* addr) |
| 97 | { |