Evo C++ Library v0.5.1
Public Types | Public Member Functions | List of all members
AsyncServerHandler::SimpleSharedBase< T > Struct Template Reference

#include <evo/ioasync_server.h>

Detailed Description

template<class T = Global>
struct evo::AsyncServerHandler::SimpleSharedBase< T >

Default shared data (empty) with template parameter for global data type.

Template Parameters
TGlobal type to use

Public Types

typedef T Global
 Global data type used. More...
 

Public Member Functions

bool on_init (AsyncBase &server, Global &global)
 Called when server is initialized, before any connections are accepted. More...
 
void on_uninit ()
 Called when server is shutting down, after last request has completed. More...
 

Member Typedef Documentation

◆ Global

typedef T Global

Global data type used.

Member Function Documentation

◆ on_init()

bool on_init ( AsyncBase server,
Global global 
)
inline

Called when server is initialized, before any connections are accepted.

  • When overriding this Shared struct, this is the place to attach any async clients so they use the server event-loop
Parameters
serverServer AsyncBase instance
globalReference to global data
Returns
Whether successful, false on critical error (which prevents server startup)

◆ on_uninit()

void on_uninit ( )
inline

Called when server is shutting down, after last request has completed.


The documentation for this struct was generated from the following file: