Realistic 3D camera system
3D camera system components
|
#include <message_host.h>
Public Member Functions | |
virtual void | message_recieved (message_client message)=0 |
File: message_host.h Author: Martin Kjellqvist marti n.kj ellqv ist@ miun. se
Created on May 7, 2017, 7:38 PM
Considering doing blocking reads to avoid having to deal with races on the camera clients.
The desired API should be used something like
User:
void on_create_message_host(){ message_host host(port, callback_object_on_connect); } // Who is the owner of message_client? // I'm thinking message_host + weak_ptr to clients. // the lifetime of clients will not outlive the host. void callback_on_connect(std::weak_ptr<message_client> client){ client->set_message_recieved_handler(callback_object_on_message_recieved); // async client->post("Hello"); //sync client->send("World"); } void callback_on_message_recieved(std::weak_ptr<message_client> client, const string& message){ // recieved message client->send("I got " + message + ", thank you!"); }
$Id$
Definition at line 44 of file message_host.h.
|
pure virtual |