hamcast
Version 0.7
|
#include <client_channel.hpp>
Public Types | |
typedef intrusive_ptr < client_channel > | ptr |
![]() | |
typedef intrusive_ptr< channel > | ptr |
Public Member Functions | |
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) |
virtual void | register_callback (const membership_event_callback &cb) |
![]() | |
long | ref_count () |
Static Public Member Functions | |
static ptr | get () |
![]() | |
static void | add_ref (ref_counted *rc) |
static void | release (ref_counted *rc) |
Protected Member Functions | |
virtual void | ipc_read () |
virtual void | poll_messages (size_t num) |
virtual void | on_exit (const std::string &) |
![]() | |
channel (const util::source::ptr &in, const util::sink::ptr &out, int ms_poll_timeout=-1) | |
channel (const std::pair< util::source::ptr, util::sink::ptr > &io_pair) | |
void | notify_message (size_t num=1) |
![]() | |
ref_counted () | |
void | ref () |
bool | deref () |
An IPC channel describing the connection from a client to the middleware.
A smart pointer for client_channel instances.
|
static |
Get a channel that is connected to the middleware.
|
protectedvirtual |
Reads data form the IPC channel via m_source
.
Implements hamcast::ipc::channel.
|
protectedvirtual |
Override this function if you want to run any cleanup code after the receive and send loop have exited.
err_str | Occurred error. |
Reimplemented from hamcast::ipc::channel.
|
protectedvirtual |
Reads num
messages from the channel's queue.
Implements hamcast::ipc::channel.
|
virtual |
Register cb
.
cb | Membership event callback. |
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
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. |