An IPC channel describing the connection from a client to the middleware. More...
#include <client_channel.hpp>
Public Types | |
typedef boost::intrusive_ptr < client_channel > | ptr |
Public Member Functions | |
virtual void | send (const message::ptr &what) |
void | send_async_data (socket_id sock, boost::uint16_t stream, boost::uint32_t ct_size, char *ct) |
message::ptr | send_sync_request (function_id sync_fun_id, const util::const_buffer &send_buffer) |
void | register_callback (const membership_event_callback &cb) |
Static Public Member Functions | |
static ptr | get () |
Protected Member Functions | |
virtual void | send_loop () |
virtual void | receive_loop () |
virtual void | on_exit (const std::string &) |
An IPC channel describing the connection from a client to the middleware.
typedef boost::intrusive_ptr<client_channel> hamcast::ipc::client_channel::ptr |
A smart pointer for client_channel instances.
Reimplemented from hamcast::ipc::channel.
client_channel::ptr hamcast::ipc::client_channel::get | ( | ) | [static] |
Get a channel that is connected to the middleware.
void hamcast::ipc::client_channel::on_exit | ( | const std::string & | err_str | ) | [protected, virtual] |
Override this function if you want to run any cleanup code after the receive and send loop have exited.
Reimplemented from hamcast::ipc::channel.
void hamcast::ipc::client_channel::receive_loop | ( | ) | [protected, virtual] |
Receives IPC data (executed in an own thread).
Implements hamcast::ipc::channel.
void hamcast::ipc::client_channel::register_callback | ( | const membership_event_callback & | cb | ) |
Register cb
.
cb | Membership event callback. |
void hamcast::ipc::client_channel::send | ( | const message::ptr & | what | ) | [virtual] |
Enqueue msg
to the internal output buffer.
Implements hamcast::ipc::channel.
void hamcast::ipc::client_channel::send_async_data | ( | socket_id | sock, | |
boost::uint16_t | stream, | |||
boost::uint32_t | ct_size, | |||
char * | ct | |||
) |
Send an asynchronous data package to the middleware.
sock | The ID of the outgoing multicast socket. | |
stream | The ID of the output stream. | |
ct_size | The size of ct . | |
ct | The content of the data package. |
ct
void hamcast::ipc::client_channel::send_loop | ( | ) | [protected, virtual] |
Sends IPC data (executed in an own thread).
Implements hamcast::ipc::channel.
message::ptr hamcast::ipc::client_channel::send_sync_request | ( | function_id | sync_fun_id, | |
const util::const_buffer & | send_buffer | |||
) |
Send a synchronous request to the middleware.
sync_fun_id | The ID of the function this IP-call should invoke. | |
send_buffer | The serialized arguments of this IP-call. |
Any | exception that might occur during the invocation of the IP-call. |