MOS Source Code
Loading...
Searching...
No Matches
RPCServer Class Referenceabstract

#include <rpc_server++.hpp>

+ Collaboration diagram for RPCServer:

Public Member Functions

 RPCServer (const std::string &server_name, const rpc_function_info_t *functions, size_t count)
 
virtual ~RPCServer ()
 
void run ()
 
std::string get_name () const
 

Protected Member Functions

virtual rpc_result_code_t dispatcher (rpc_context_t *context, u32 funcid)=0
 
virtual void on_connect (rpc_context_t *)
 
virtual void on_disconnect (rpc_context_t *)
 
template<typename T >
T * get_data (rpc_context_t *context)
 
template<typename T >
void set_data (rpc_context_t *context, T *data)
 

Private Attributes

rpc_server_tserver
 
std::string server_name
 

Detailed Description

Definition at line 14 of file rpc_server++.hpp.

Constructor & Destructor Documentation

◆ RPCServer()

RPCServer ( const std::string & server_name,
const rpc_function_info_t * functions,
size_t count )
inlineexplicit

Definition at line 17 of file rpc_server++.hpp.

+ Here is the call graph for this function:

◆ ~RPCServer()

virtual ~RPCServer ( )
inlinevirtual

Definition at line 51 of file rpc_server++.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ run()

void run ( )
inline

Definition at line 56 of file rpc_server++.hpp.

+ Here is the call graph for this function:

◆ get_name()

std::string get_name ( ) const
inline

Definition at line 61 of file rpc_server++.hpp.

◆ dispatcher()

virtual rpc_result_code_t dispatcher ( rpc_context_t * context,
u32 funcid )
protectedpure virtual

◆ on_connect()

virtual void on_connect ( rpc_context_t * )
inlineprotectedvirtual

Definition at line 69 of file rpc_server++.hpp.

◆ on_disconnect()

virtual void on_disconnect ( rpc_context_t * )
inlineprotectedvirtual

Definition at line 73 of file rpc_server++.hpp.

◆ get_data()

template<typename T >
T * get_data ( rpc_context_t * context)
inlineprotected

Definition at line 79 of file rpc_server++.hpp.

+ Here is the call graph for this function:

◆ set_data()

template<typename T >
void set_data ( rpc_context_t * context,
T * data )
inlineprotected

Definition at line 85 of file rpc_server++.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ server

rpc_server_t* server
private

Definition at line 91 of file rpc_server++.hpp.

Referenced by RPCServer(), run(), and ~RPCServer().

◆ server_name

std::string server_name
private

Definition at line 92 of file rpc_server++.hpp.

Referenced by get_name(), and RPCServer().


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