18 #ifndef ServiceRegistry_h__
19 #define ServiceRegistry_h__
49 template<
class Service>
55 template<
class Service>
58 Service(session).CallServerMethod(token, methodId, std::forward<MessageBuffer>(buffer));
61 std::unordered_map<uint32, std::function<void(WorldSession*, uint32, uint32, MessageBuffer)>>
_dispatchers;
65 #define sServiceDispatcher Battlenet::WorldserverServiceDispatcher::Instance()
67 #endif // ServiceRegistry_h__
Definition: method_options.pb.h:28
Definition: WorldserverServiceDispatcher.h:39
void AddService()
Definition: WorldserverServiceDispatcher.h:50
WorldserverServiceDispatcher()
Definition: WorldserverServiceDispatcher.cpp:21
uint32_t uint32
Definition: Define.h:150
static void Dispatch(WorldSession *session, uint32 token, uint32 methodId, MessageBuffer buffer)
Definition: WorldserverServiceDispatcher.h:56
const FieldDescriptor value
Definition: descriptor.h:1522
Player session in the World.
Definition: WorldSession.h:882
void Dispatch(WorldSession *session, uint32 serviceHash, uint32 token, uint32 methodId, MessageBuffer buffer)
Definition: WorldserverServiceDispatcher.cpp:36
std::unordered_map< uint32, std::function< void(WorldSession *, uint32, uint32, MessageBuffer)> > _dispatchers
Definition: WorldserverServiceDispatcher.h:61
static WorldserverServiceDispatcher & Instance()
Definition: WorldserverServiceDispatcher.cpp:45
Definition: MessageBuffer.h:24