SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
Classes | Functions | Variables
Projects/CoX/Servers/AuthServer

Classes

struct  ClientAcceptor
 
class  AuthServer
 main class of the authentication server, it controls the AuthHandler instances More...
 

Functions

ACE_INT32 ACE_TMAIN (int argc, ACE_TCHAR *argv[])
 
void AuthHandler::dispatch (SEGSEvents::Event *ev) override
 
 AuthHandler::AuthHandler (AuthServer *our_server)
 
void AuthHandler::on_timeout (SEGSEvents::Timeout *ev)
 
void AuthHandler::on_connect (SEGSEvents::Connect *ev)
 
void AuthHandler::on_disconnect (SEGSEvents::Disconnect *ev)
 
void AuthHandler::auth_error (EventSrc *lnk, uint32_t code)
 
bool AuthHandler::isClientConnectedAnywhere (uint32_t client_id)
 
void AuthHandler::on_retrieve_account_response (SEGSEvents::RetrieveAccountResponse *msg)
 This function handles database server informing us about account details. More...
 
void AuthHandler::on_login (SEGSEvents::LoginRequest *ev)
 
void AuthHandler::on_server_list_request (SEGSEvents::ServerListRequest *ev)
 
void AuthHandler::on_server_selected (SEGSEvents::ServerSelectRequest *ev)
 
void AuthHandler::on_client_expected (SEGSEvents::ExpectClientResponse *ev)
 
void AuthHandler::on_client_connected_to_other_server (SEGSEvents::ClientConnectedMessage *ev)
 
void AuthHandler::on_client_disconnected_from_other_server (SEGSEvents::ClientDisconnectedMessage *ev)
 
void AuthHandler::reap_stale_links ()
 
void AuthHandler::serialize_from (std::istream &is) override
 
void AuthHandler::serialize_to (std::ostream &is) override
 
void AuthHandler::on_server_status_change (SEGSEvents::GameServerStatusMessage *ev)
 
void AuthHandler::on_db_error (SEGSEvents::AuthDbStatusMessage *ev)
 
 AuthServer::AuthServer ()
 
 AuthServer::~AuthServer () override
 
void AuthServer::dispatch (SEGSEvents::Event *ev) override
 
void AuthServer::serialize_from (std::istream &is) override
 
void AuthServer::serialize_to (std::ostream &is) override
 
bool AuthServer::ReadConfigAndRestart ()
 Read server configuration. More...
 
bool AuthServer::Run ()
 Starts this server up, by opening the connection acceptor on given location. This method can be called multiple times, to re-open the listening socket on different addresses. More...
 
void AuthServer::per_thread_shutdown () override
 Shuts the server down. More...
 
bool AuthServer::per_thread_startup () override
 

Variables

static uint64_t AuthHandler::s_last_session_id =1
 Monotonically incrementing session ids, starting at 1, to make 0 special. More...
 

Detailed Description

Function Documentation

◆ ACE_TMAIN()

ACE_INT32 ACE_TMAIN ( int  argc,
ACE_TCHAR *  argv[] 
)
Here is the call graph for this function:

◆ auth_error()

void AuthHandler::auth_error ( EventSrc lnk,
uint32_t  code 
)
protected
Here is the caller graph for this function:

◆ AuthHandler()

AuthHandler::AuthHandler ( AuthServer our_server)
Here is the call graph for this function:

◆ AuthServer()

AuthServer::AuthServer ( )

◆ dispatch() [1/2]

void AuthServer::dispatch ( SEGSEvents::Event ev)
overrideprotectedvirtual

Implements EventProcessor.

Here is the call graph for this function:

◆ dispatch() [2/2]

void AuthHandler::dispatch ( SEGSEvents::Event ev)
overrideprotectedvirtual

Implements EventProcessor.

Here is the call graph for this function:

◆ isClientConnectedAnywhere()

bool AuthHandler::isClientConnectedAnywhere ( uint32_t  client_id)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_client_connected_to_other_server()

void AuthHandler::on_client_connected_to_other_server ( SEGSEvents::ClientConnectedMessage *  ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_client_disconnected_from_other_server()

void AuthHandler::on_client_disconnected_from_other_server ( SEGSEvents::ClientDisconnectedMessage *  ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_client_expected()

void AuthHandler::on_client_expected ( SEGSEvents::ExpectClientResponse *  ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_connect()

void AuthHandler::on_connect ( SEGSEvents::Connect ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_db_error()

void AuthHandler::on_db_error ( SEGSEvents::AuthDbStatusMessage *  ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_disconnect()

void AuthHandler::on_disconnect ( SEGSEvents::Disconnect ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_login()

void AuthHandler::on_login ( SEGSEvents::LoginRequest ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_retrieve_account_response()

void AuthHandler::on_retrieve_account_response ( SEGSEvents::RetrieveAccountResponse *  msg)
protected

This function handles database server informing us about account details.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_server_list_request()

void AuthHandler::on_server_list_request ( SEGSEvents::ServerListRequest ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_server_selected()

void AuthHandler::on_server_selected ( SEGSEvents::ServerSelectRequest ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_server_status_change()

void AuthHandler::on_server_status_change ( SEGSEvents::GameServerStatusMessage *  ev)
protected
Here is the caller graph for this function:

◆ on_timeout()

void AuthHandler::on_timeout ( SEGSEvents::Timeout ev)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ per_thread_shutdown()

void AuthServer::per_thread_shutdown ( )
overrideprotectedvirtual

Shuts the server down.

Returns
bool, if it's false, we failed to close down cleanly

Reimplemented from EventProcessor.

Here is the call graph for this function:

◆ per_thread_startup()

bool AuthServer::per_thread_startup ( )
overrideprotectedvirtual

Called in svc before it starts servicing events, if it returns false, the svc will return -1 thus ending that particular thread

Reimplemented from EventProcessor.

◆ ReadConfigAndRestart()

bool AuthServer::ReadConfigAndRestart ( )
protected

Read server configuration.

Note
m_mutex is held locked during this function
Returns
bool, if it's false, this function failed somehow.
Here is the call graph for this function:

◆ reap_stale_links()

void AuthHandler::reap_stale_links ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Run()

bool AuthServer::Run ( )
protected

Starts this server up, by opening the connection acceptor on given location. This method can be called multiple times, to re-open the listening socket on different addresses.

Returns
bool, if it's false, we somehow failed to start. Error report is logged by qCritical

◆ serialize_from() [1/2]

void AuthServer::serialize_from ( std::istream &  is)
overrideprotectedvirtual

Implements EventProcessor.

◆ serialize_from() [2/2]

void AuthHandler::serialize_from ( std::istream &  is)
overrideprotectedvirtual

Implements EventProcessor.

◆ serialize_to() [1/2]

void AuthServer::serialize_to ( std::ostream &  is)
overrideprotectedvirtual

Implements EventProcessor.

◆ serialize_to() [2/2]

void AuthHandler::serialize_to ( std::ostream &  is)
overrideprotectedvirtual

Implements EventProcessor.

◆ ~AuthServer()

AuthServer::~AuthServer ( )
override
Here is the call graph for this function:

Variable Documentation

◆ s_last_session_id

uint64_t AuthHandler::s_last_session_id =1
staticprotected

Monotonically incrementing session ids, starting at 1, to make 0 special.