Classes | |
class | AdcCommand |
class | AsyncStream |
class | Bot |
struct | BotRemover |
class | Buffer |
Reference-counted buffer. More... | |
class | CID |
class | Client |
The client represents one connection to a user. More... | |
class | ClientManager |
The ClientManager takes care of all protocol details, clients and so on. More... | |
class | CommandHandler |
class | CompareFirst |
Evaluates op(pair<T1, T2>.first, compareTo). More... | |
class | CompareSecond |
Evaluates op(pair<T1, T2>.second, compareTo). More... | |
struct | Connection |
struct | DeleteFunction |
struct | Disconnector |
class | Encoder |
class | Entity |
class | Exception |
struct | FastAlloc |
class | File |
class | Flags |
class | Hub |
class | LogManager |
Log writing utilities. More... | |
struct | ManagedConnection |
class | ManagedSocket |
An asynchronous socket managed by SocketManager. More... | |
class | Plugin |
Public plugin interface, for plugin intercom. More... | |
class | PluginData |
class | PluginManager |
class | Pool |
A thread safe object pool. More... | |
struct | PoolDummy |
class | ScopedLock |
class | Semaphore |
struct | ServerInfo |
class | Signal |
struct | SignalTraits |
class | SimplePool |
class | SimpleXML |
A simple XML class that loads an XML-ish structure into an internal tree and allows easy access to each element through a "current location". More... | |
class | Singleton |
class | SocketFactory |
class | SocketManager |
class | SocketStream |
struct | Stats |
class | Text |
Text handling routines for ADCH++. More... | |
class | Thread |
class | TigerHash |
class | TimerManager |
class | Util |
Typedefs | |
typedef shared_ptr< AsyncStream > | AsyncStreamPtr |
typedef std::vector< BufferPtr > | BufferList |
typedef shared_ptr< Buffer > | BufferPtr |
typedef ByteVector::iterator | ByteIter |
typedef std::vector< uint8_t > | ByteVector |
typedef std::unique_ptr < Connection > | ConnectionPtr |
typedef std::map< uint16_t, std::string > | FieldMap |
Named parameter map (INF etc), AdcCommand::toField offers conversion. | |
typedef shared_ptr < ManagedConnection > | ManagedConnectionPtr |
typedef shared_ptr< ManagedSocket > | ManagedSocketPtr |
typedef int(* | PLUGIN_GET_VERSION )() |
PLUGIN_API double pluginGetVersion() This function should just return the constant PLUGINVERSIONFLOAT so that the pluginmanager can determine if this plugin should be loaded or not. | |
typedef int(* | PLUGIN_LOAD )() |
PLUGIN_API void pluginLoad() This function is called when the hub is starting up and loading the plugin. | |
typedef void * | plugin_t |
typedef void(* | PLUGIN_UNLOAD )() |
PLUGIN_API void pluginUnload() Called when the hub is shutting down. | |
typedef std::function< void(void *) | PluginDataDeleter ) |
typedef shared_ptr< PluginData > | PluginDataHandle |
typedef std::vector < ServerInfoPtr > | ServerInfoList |
typedef shared_ptr< ServerInfo > | ServerInfoPtr |
typedef SocketStream < ip::tcp::socket > | SimpleSocketStream |
typedef shared_ptr< SocketFactory > | SocketFactoryPtr |
typedef StringList::iterator | StringIter |
typedef StringList::const_iterator | StringIterC |
typedef std::vector< std::string > | StringList |
Functions | |
void | cleanup () |
Release any resources held by adchpp. | |
template<typename T1 > | |
int | compare (const T1 &v1, const T1 &v2) |
Compares two values. | |
void | debugTrace (const char *format,...) |
void | initialize (const std::string &path) |
Initialize configuration. | |
void | logAssert (const char *file, int line, const char *exp) |
template<typename F1 , typename F2 > | |
ManagedConnectionPtr | manage (Signal< F1 > *signal, const F2 &f) |
static void | sgenrand (unsigned long seed) |
void | shutdown (void(*f)()) |
Stop listening for incoming connections. | |
STANDARD_EXCEPTION (ThreadException) | |
STANDARD_EXCEPTION (SimpleXMLException) | |
STANDARD_EXCEPTION (FileException) | |
STANDARD_EXCEPTION (ParseException) | |
void | startup (void(*f)()) |
Load plugins and start listening for incoming connections. | |
static size_t | sum (const BufferList &l) |
Variables | |
string | appName = APPNAME |
const char | compileTime [] = __DATE__ " " __TIME__ |
static bool | initialized = false |
static unsigned long | mt [N] |
static int | mti = N+1 |
static bool | running = false |
static const int | SOCKET_BUFFER_SIZE = 1024 |
float | versionFloat = VERSIONFLOAT |
string | versionString = FULLVERSIONSTRING |
typedef shared_ptr<AsyncStream> adchpp::AsyncStreamPtr |
Definition at line 35 of file AsyncStream.h.
typedef std::vector<BufferPtr> adchpp::BufferList |
typedef shared_ptr<Buffer> adchpp::BufferPtr |
typedef ByteVector::iterator adchpp::ByteIter |
typedef std::vector<uint8_t> adchpp::ByteVector |
typedef std::unique_ptr<Connection> adchpp::ConnectionPtr |
typedef std::map<uint16_t, std::string> adchpp::FieldMap |
Named parameter map (INF etc), AdcCommand::toField offers conversion.
typedef shared_ptr<ManagedConnection> adchpp::ManagedConnectionPtr |
typedef shared_ptr<ManagedSocket> adchpp::ManagedSocketPtr |
typedef int(* adchpp::PLUGIN_GET_VERSION)() |
PLUGIN_API double pluginGetVersion() This function should just return the constant PLUGINVERSIONFLOAT so that the pluginmanager can determine if this plugin should be loaded or not.
Definition at line 100 of file PluginManager.h.
typedef int(* adchpp::PLUGIN_LOAD)() |
PLUGIN_API void pluginLoad() This function is called when the hub is starting up and loading the plugin.
Here you should load any data your plugin might need and connect to any Managers you might be interested in. Note; you also have to connect to PluginManager itself to receive its events.
Definition at line 113 of file PluginManager.h.
typedef void* adchpp::plugin_t |
Definition at line 90 of file PluginManager.h.
typedef void(* adchpp::PLUGIN_UNLOAD)() |
PLUGIN_API void pluginUnload() Called when the hub is shutting down.
Definition at line 120 of file PluginManager.h.
typedef std::function<void (void*) adchpp::PluginDataDeleter) |
typedef shared_ptr<PluginData> adchpp::PluginDataHandle |
typedef std::vector<ServerInfoPtr> adchpp::ServerInfoList |
typedef shared_ptr<ServerInfo> adchpp::ServerInfoPtr |
typedef SocketStream<ip::tcp::socket> adchpp::SimpleSocketStream |
Definition at line 111 of file SocketManager.cpp.
typedef shared_ptr<SocketFactory> adchpp::SocketFactoryPtr |
typedef StringList::iterator adchpp::StringIter |
typedef StringList::const_iterator adchpp::StringIterC |
typedef std::vector<std::string> adchpp::StringList |
ADCHPP_DLL void adchpp::cleanup | ( | ) |
Release any resources held by adchpp.
Before using any library routines again, you must call initalialize.
int adchpp::compare | ( | const T1 & | v1, | |
const T1 & | v2 | |||
) | [inline] |
void adchpp::debugTrace | ( | const char * | format, | |
... | ||||
) | [inline] |
ADCHPP_DLL void adchpp::initialize | ( | const string & | configPath | ) |
Initialize configuration.
ADCHPP_DLL void adchpp::logAssert | ( | const char * | file, | |
int | line, | |||
const char * | exp | |||
) |
ManagedConnectionPtr adchpp::manage | ( | Signal< F1 > * | signal, | |
const F2 & | f | |||
) | [inline] |
Definition at line 107 of file Signal.h.
References adchpp::Signal< F >::connect().
static void adchpp::sgenrand | ( | unsigned long | seed | ) | [static] |
Definition at line 362 of file Util.cpp.
Referenced by adchpp::Util::initialize(), and adchpp::Util::rand().
ADCHPP_DLL void adchpp::shutdown | ( | void(*)() | f | ) |
Stop listening for incoming connections.
adchpp::STANDARD_EXCEPTION | ( | ThreadException | ) |
adchpp::STANDARD_EXCEPTION | ( | SimpleXMLException | ) |
adchpp::STANDARD_EXCEPTION | ( | FileException | ) |
adchpp::STANDARD_EXCEPTION | ( | ParseException | ) |
ADCHPP_DLL void adchpp::startup | ( | void(*)() | f | ) |
Load plugins and start listening for incoming connections.
static size_t adchpp::sum | ( | const BufferList & | l | ) | [static] |
Definition at line 39 of file ManagedSocket.cpp.
Referenced by adchpp::ManagedSocket::getQueuedBytes().
ADCHPP_DLL std::string adchpp::appName = APPNAME |
Definition at line 46 of file version.cpp.
ADCHPP_DLL const char adchpp::compileTime = __DATE__ " " __TIME__ |
Definition at line 30 of file common.cpp.
bool adchpp::initialized = false [static] |
Definition at line 32 of file common.cpp.
unsigned long adchpp::mt[N] [static] |
Definition at line 358 of file Util.cpp.
Referenced by adchpp::Util::rand(), and sgenrand().
int adchpp::mti = N+1 [static] |
Definition at line 359 of file Util.cpp.
Referenced by adchpp::Util::rand(), and sgenrand().
bool adchpp::running = false [static] |
Definition at line 33 of file common.cpp.
const int adchpp::SOCKET_BUFFER_SIZE = 1024 [static] |
Definition at line 119 of file SocketManager.cpp.
Referenced by adchpp::SocketFactory::handleAccept().
ADCHPP_DLL float adchpp::versionFloat = VERSIONFLOAT |
Definition at line 48 of file version.cpp.
ADCHPP_DLL std::string adchpp::versionString = FULLVERSIONSTRING |
Definition at line 47 of file version.cpp.
Referenced by adchpp::Hub::Hub().