[Cleanup] Remove GetServerByAddress() from server_manager.h (#3119)

# Notes
- This is unused.
This commit is contained in:
Alex King 2023-03-17 19:21:38 -04:00 committed by GitHub
parent 6b8e74a29f
commit 6e5da0e558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 30 deletions

View File

@ -73,25 +73,6 @@ ServerManager::ServerManager()
ServerManager::~ServerManager() = default;
/**
* @param ip_address
* @param port
* @return
*/
WorldServer *ServerManager::GetServerByAddress(const std::string &ip_address, int port)
{
auto iter = m_world_servers.begin();
while (iter != m_world_servers.end()) {
if ((*iter)->GetConnection()->Handle()->RemoteIP() == ip_address &&
(*iter)->GetConnection()->Handle()->RemotePort()) {
return (*iter).get();
}
++iter;
}
return nullptr;
}
/**
* @param client
* @param sequence

View File

@ -72,17 +72,6 @@ public:
const std::list<std::unique_ptr<WorldServer>> &getWorldServers() const;
private:
/**
* Retrieves a server(if exists) by ip address
* Useful utility for the reconnect process
*
* @param ip_address
* @param port
* @return
*/
WorldServer *GetServerByAddress(const std::string &ip_address, int port);
std::unique_ptr<EQ::Net::ServertalkServer> m_server_connection;
std::list<std::unique_ptr<WorldServer>> m_world_servers;