SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AuthServer.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #pragma once
9 // SEGS includes
11 #include "EventProcessor.h"
12 
13 // ACE includes
14 #include <ace/INET_Addr.h>
15 #include <ace/Synch.h>
16 
17 class AuthLink;
18 class AuthHandler;
19 struct ClientAcceptor;
20 class AuthServer : public EventProcessor
21 {
22 public:
23  AuthServer();
24  ~AuthServer();
25 
26  bool ShutDown();
27  bool ReadConfigAndRestart();
28 
29 protected:
30  bool Run();
32  ACE_INET_Addr m_location;
33  bool m_running;
34  ACE_Thread_Mutex m_mutex;
35  std::unique_ptr<AuthHandler> m_handler;
36 
37  // EventProcessor interface
38  void dispatch(SEGSEvent *ev);
39 };
void dispatch(SEGSEvent *ev)
Definition: AuthServer.cpp:66
bool ShutDown()
Shuts the server down.
Definition: AuthServer.cpp:133
Definition: SEGSEvent.h:32
ClientAcceptor * m_acceptor
ace acceptor wrapping AuthClientService
Definition: AuthServer.h:31
AuthServer()
Definition: AuthServer.cpp:51
Definition: AuthServer.cpp:31
bool m_running
true if this server is running
Definition: AuthServer.h:33
bool Run()
Starts this server up, by opening the connection acceptor on given location. This method can be calle...
Definition: AuthServer.cpp:113
ACE_INET_Addr m_location
address this server will bind at.
Definition: AuthServer.h:32
std::unique_ptr< AuthHandler > m_handler
holds the AuthHandler
Definition: AuthServer.h:35
Definition: EventProcessor.h:13
main class of the authentication server, it controls the AuthHandler instances
Definition: AuthServer.h:20
~AuthServer()
Definition: AuthServer.cpp:61
ACE_Thread_Mutex m_mutex
used to prevent multiple threads accessing config reload function
Definition: AuthServer.h:34
bool ReadConfigAndRestart()
Read server configuration.
Definition: AuthServer.cpp:84
Definition: AuthHandler.h:73