32#include <SDL_thread.h>
36#include <unordered_map>
42#define CLIENT_PROTOCOL_VERSION 1
98 void setError(
const std::string &error);
A mutex provides mutual exclusion of access to certain data that is accessed by multiple threads.
Used for building an outgoing message to eAthena.
void setError(const std::string &error)
bool connect(const ServerInfo &server)
SDL_Thread * mWorkerThread
const ServerInfo & getServer() const
void unregisterHandler(MessageHandler *handler)
std::unordered_map< uint16_t, const PacketInfo * > mPacketInfo
void registerHandler(MessageHandler *handler)
friend int networkThread(void *data)
uint16_t readWord(int pos)
static Network * mInstance
std::map< uint16_t, MessageHandler * > mMessageHandlers
const std::string & getError() const
const char * messageName(uint16_t id) const
Warning: buffers and other variables are shared, so there can be only one connection active at a time...