tec::networking::Server
#include <server.hpp>
Inherits from tec::EventQueue< EntityCreated >, tec::EventQueue< EntityDestroyed >
Public Functions
Name | |
---|---|
Server(tcp::endpoint & endpoint) | |
void | Deliver(MessageOut & msg, bool save_to_recent =true) |
void | Deliver(MessageOut && msg, bool save_to_recent =true) |
void | Deliver(std::shared_ptr< ClientConnection > client, MessageOut & msg) |
void | Deliver(std::shared_ptr< ClientConnection > client, MessageOut && msg) |
bool | OnConnect() |
void | OnDisconnect(std::shared_ptr< ClientConnection > client) |
void | Start() |
void | Stop() |
const std::set< std::shared_ptr< ClientConnection > > & | GetClients() |
LuaSystem * | GetLuaSystem() |
void | ProcessEvents() |
virtual void | On(eid , std::shared_ptr< EntityCreated > data) override |
virtual void | On(eid entity_id, std::shared_ptr< EntityDestroyed > data) override |
system::UserAuthenticator & | GetAuthenticator() |
Public Attributes
Name | |
---|---|
std::mutex | client_list_mutex |
Friends
Name | |
---|---|
class | ClientConnection |
Additional inherited members
Public Functions inherited from tec::EventQueue< EntityCreated >
Name | |
---|---|
EventQueue() | |
EventQueue(eid entity_id) | |
virtual | ~EventQueue() |
void | ProcessEventQueue() |
void | QueueEvent(Event< T > && e) |
Protected Attributes inherited from tec::EventQueue< EntityCreated >
Name | |
---|---|
Queue< Event< T > > * | read_event_queue |
std::atomic< Queue< Event< T > > * > | write_event_queue |
Public Functions inherited from tec::EventQueue< EntityDestroyed >
Name | |
---|---|
EventQueue() | |
EventQueue(eid entity_id) | |
virtual | ~EventQueue() |
void | ProcessEventQueue() |
void | QueueEvent(Event< T > && e) |
Protected Attributes inherited from tec::EventQueue< EntityDestroyed >
Name | |
---|---|
Queue< Event< T > > * | read_event_queue |
std::atomic< Queue< Event< T > > * > | write_event_queue |
Public Functions Documentation
function Server
Server(
tcp::endpoint & endpoint
)
function Deliver
void Deliver(
MessageOut & msg,
bool save_to_recent =true
)
function Deliver
void Deliver(
MessageOut && msg,
bool save_to_recent =true
)
function Deliver
void Deliver(
std::shared_ptr< ClientConnection > client,
MessageOut & msg
)
function Deliver
void Deliver(
std::shared_ptr< ClientConnection > client,
MessageOut && msg
)
function OnConnect
bool OnConnect()
function OnDisconnect
void OnDisconnect(
std::shared_ptr< ClientConnection > client
)
function Start
void Start()
function Stop
void Stop()
function GetClients
inline const std::set< std::shared_ptr< ClientConnection > > & GetClients()
function GetLuaSystem
inline LuaSystem * GetLuaSystem()
function ProcessEvents
void ProcessEvents()
function On
virtual void On(
eid ,
std::shared_ptr< EntityCreated > data
) override
Reimplements: tec::EventQueue::On
function On
virtual void On(
eid entity_id,
std::shared_ptr< EntityDestroyed > data
) override
Reimplements: tec::EventQueue::On
function GetAuthenticator
inline system::UserAuthenticator & GetAuthenticator()
Public Attributes Documentation
variable client_list_mutex
std::mutex client_list_mutex;
Friends
friend ClientConnection
friend class ClientConnection(
ClientConnection
);
Updated on 2022-07-24 at 19:27:35 +0000