| 125 | } |
| 126 | |
| 127 | EndPoint *EndPointFactory::getOrCreateEp(uint32_t ip) { |
| 128 | std::unique_lock<std::mutex> lock(map_mtx_); |
| 129 | if (0 == ip_ep_map_.count(ip)) { |
| 130 | ip_ep_map_[ip] = new EndPoint(this->thread_); |
| 131 | } |
| 132 | return ip_ep_map_[ip]; |
| 133 | } |
| 134 | |
| 135 | EndPoint *EndPointFactory::getEp(uint32_t ip) { |
| 136 | std::unique_lock<std::mutex> lock(map_mtx_); |