mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-15 00:08:07 -04:00
47 lines
1.6 KiB
C++
Executable File
47 lines
1.6 KiB
C++
Executable File
// ======================================================================
|
|
//
|
|
// Locator.h
|
|
//
|
|
// Copyright 2000-04 Sony Online Entertainment
|
|
//
|
|
// ======================================================================
|
|
|
|
#ifndef _INCLUDED_Locator_H
|
|
#define _INCLUDED_Locator_H
|
|
|
|
// ======================================================================
|
|
|
|
#include <string>
|
|
|
|
class GameNetworkMessage;
|
|
class ManagerConnection;
|
|
|
|
// ======================================================================
|
|
|
|
class Locator
|
|
{
|
|
public:
|
|
static void install();
|
|
static void closed(std::string const &label, ManagerConnection const *oldConnection);
|
|
static ManagerConnection *getBestServer(std::string const &processName, std::string const &options, float cost);
|
|
static float getMyLoad();
|
|
static float getMyMaximumLoad();
|
|
static float getServerLoad(std::string const &label);
|
|
static float getServerMaximumLoad(std::string const &label);
|
|
static ManagerConnection *getServer(std::string const &label);
|
|
static void incrementMyLoad(float amount);
|
|
static void incrementServerLoad(std::string const &label, float amount);
|
|
static void decrementMyLoad(float amount);
|
|
static void decrementServerLoad(std::string const &label, float amount);
|
|
static void opened(std::string const &label, ManagerConnection *newConnection);
|
|
static void sendToAllTaskManagers(GameNetworkMessage const &msg);
|
|
static void updateServerLoad(std::string const &label, float load);
|
|
static void updateAllLoads(float delta);
|
|
static stdmap<std::string, std::string>::fwd const & getClosedConnections();
|
|
};
|
|
|
|
// ======================================================================
|
|
|
|
#endif // _INCLUDED_Locator_H
|
|
|