| 146 | } |
| 147 | |
| 148 | int CServerBrowserPingCache::GetPing(const NETADDR *pAddrs, int NumAddrs) const |
| 149 | { |
| 150 | int Ping = -1; |
| 151 | for(int i = 0; i < NumAddrs; i++) |
| 152 | { |
| 153 | NETADDR LookupAddr = pAddrs[i]; |
| 154 | LookupAddr.type &= ~NETTYPE_TW7; |
| 155 | LookupAddr.port = 0; |
| 156 | auto Entry = m_Entries.find(LookupAddr); |
| 157 | if(Entry == m_Entries.end()) |
| 158 | { |
| 159 | continue; |
| 160 | } |
| 161 | if(Ping == -1 || Entry->second < Ping) |
| 162 | { |
| 163 | Ping = Entry->second; |
| 164 | } |
| 165 | } |
| 166 | return Ping; |
| 167 | } |
| 168 | |
| 169 | IServerBrowserPingCache *CreateServerBrowserPingCache(IConsole *pConsole, IStorage *pStorage) |
| 170 | { |