17 #ifndef YAMICORE_AGENT_H_INCLUDED 18 #define YAMICORE_AGENT_H_INCLUDED 20 #include "allocator.h" 21 #include "channel_descriptor.h" 25 #ifdef YAMI4_WITH_NETX 27 #endif // YAMI4_WITH_NETX 108 void * dispatch_hint,
110 void * disconnection_hook_hint = NULL,
111 void * working_area = NULL, std::size_t area_size = 0);
122 void * dispatch_hint,
124 void * disconnection_hook_hint = NULL,
125 void * working_area = NULL, std::size_t area_size = 0);
127 #ifdef YAMI4_WITH_NETX 128 void set_netx_context(NX_IP * ip, NX_PACKET_POOL * packet_pool);
133 #endif // YAMI4_WITH_NETX 143 void install_event_notifications(
145 void * event_notification_hint);
155 void install_io_error_logger(
157 void * io_error_callback_hint);
205 result open(
const char * target);
223 bool & created_new_channel);
232 bool & created_new_channel,
const parameters * overriding_options);
244 result is_open(
const char * target,
274 result close(
const char * target, std::size_t priority = 0);
294 result hard_close(
const char * target);
334 std::size_t priority = 0,
336 void * progress_hint = NULL);
345 result post(
const char * target,
348 std::size_t priority = 0,
350 void * progress_hint = NULL);
387 result add_listener(
const char * target,
389 void * connection_hook_hint = NULL,
390 const char * * resolved_target = NULL);
402 result remove_listener(
const char * target);
433 result do_some_work(std::size_t timeout,
434 bool allow_outgoing_traffic =
true,
435 bool allow_incoming_traffic =
true);
438 result interrupt_work_waiter();
441 void get_channel_usage(std::size_t & max_allowed, std::size_t & used);
444 result get_pending_outgoing_bytes(
446 result get_pending_outgoing_bytes(
447 const char * target, std::size_t & bytes);
452 void operator=(
const agent &);
456 void * dispatch_hint,
458 void * disconnection_hook_hint,
459 void * working_area, std::size_t area_size);
463 details::allocator alloc_;
464 bool uses_private_area_;
466 details::channel_group * ch_group_;
468 std::size_t max_channels_allowed_;
469 std::size_t channels_used_;
476 #endif // YAMICORE_AGENT_H_INCLUDED Descriptor handle for the physical channel.
Definition: channel_descriptor.h:38
void(* closed_connection_function)(void *hint, const char *name, result reason)
Definition: core.h:103
void(* io_error_function)(void *hint, int error_code, const char *description)
Type of function callback for internal I/O error logging.
Definition: core.h:149
Collection of message parameters.
Definition: parameters.h:91
void(* message_progress_function)(void *hint, std::size_t sent_bytes, std::size_t total_byte_count)
Definition: core.h:121
void(* new_incoming_connection_function)(void *hint, const char *source, std::size_t index, std::size_t sequence_number)
Definition: core.h:90
Message broker.
Definition: agent.h:55
Namespace devoted for everything related to YAMI4.
Definition: agent.h:29
void(* incoming_message_dispatch_function)(void *hint, const char *source, const char *header_buffers[], std::size_t header_buffer_sizes[], std::size_t num_of_header_buffers, const char *body_buffers[], std::size_t body_buffer_sizes[], std::size_t num_of_body_buffers)
Definition: core.h:70
void(* event_notification_function)(void *hint, event_notification e, const char *str, std::size_t size)
Definition: core.h:142
Common interface for serializable data source.
Definition: serializable.h:35
result
General type for reporting success and error states.
Definition: core.h:32