ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Server %s started bursting at time %lu behind_bursting %u", sid.c_str(), startms, behind_bursting);
}
-const std::string& TreeServer::GetID()
-{
- return sid;
-}
-
void TreeServer::FinishBurstInternal()
{
// Check is needed because 1202 protocol servers don't send the bursting state of a server, so servers
Utils->sidlist[sid] = this;
}
-/** These accessors etc should be pretty self-
- * explanitory.
- */
-TreeServer* TreeServer::GetRoute()
-{
- return Route;
-}
-
-const std::string& TreeServer::GetVersion()
-{
- return VersionString;
-}
-
void TreeServer::SetNextPingTime(time_t t)
{
this->NextPing = t;
LastPingWasGood = true;
}
-TreeSocket* TreeServer::GetSocket()
-{
- return Socket;
-}
-
-TreeServer* TreeServer::GetParent()
-{
- return Parent;
-}
-
-void TreeServer::SetVersion(const std::string &Version)
-{
- VersionString = Version;
-}
-
void TreeServer::AddChild(TreeServer* Child)
{
Children.push_back(Child);
* The 'route' is defined as the locally-
* connected server which can be used to reach this server.
*/
- TreeServer* GetRoute();
+ TreeServer* GetRoute() const { return Route; }
/** Returns true if this server is the tree root (i.e.: us)
*/
/** Get server version string
*/
- const std::string& GetVersion();
+ const std::string& GetVersion() const { return VersionString; }
/** Get the full version string of this server
* @return The full version string of this server, including patch version and other info
/** Get the TreeSocket pointer for local servers.
* For remote servers, this returns NULL.
*/
- TreeSocket* GetSocket();
+ TreeSocket* GetSocket() const { return Socket; }
/** Get the parent server.
* For the root node, this returns NULL.
*/
- TreeServer* GetParent();
+ TreeServer* GetParent() const { return Parent; }
/** Set the server version string
*/
- void SetVersion(const std::string &Version);
+ void SetVersion(const std::string& verstr) { VersionString = verstr; }
/** Set the full version string
* @param verstr The version string to set
/** Get server ID
*/
- const std::string& GetID();
+ const std::string& GetID() const { return sid; }
/** Marks a server as having finished bursting and performs appropriate actions.
*/
Utils->timeoutlist[this] = std::pair<std::string, int>(linkID, 30);
}
-ServerState TreeSocket::GetLinkState()
-{
- return this->LinkState;
-}
-
void TreeSocket::CleanNegotiationInfo()
{
// connect is good, reset the autoconnect block (if used)