17 #ifndef YAMICORE_CHANNEL_GROUP_H_INCLUDED 18 #define YAMICORE_CHANNEL_GROUP_H_INCLUDED 21 #include "channel_descriptor.h" 23 #include "details-fwd.h" 26 #ifdef YAMI4_WITH_OPEN_SSL 32 #include <openssl/ssl.h> 33 #endif // YAMI4_WITH_OPEN_SSL 36 #include <details-types.h> 59 const core::parameters * configuration_options,
63 void * disconnection_hook_hint);
65 void install_event_notifications(
67 void * event_notification_hint);
69 void install_io_error_logger(
71 void * io_error_callback_hint);
73 void clean(
bool uses_private_area);
78 core::channel_descriptor & new_channel,
79 bool & created_new_channel,
bool do_lock =
true,
80 const core::parameters * overriding_options = NULL);
83 core::channel_descriptor & existing_channel)
const;
88 char * target, io_descriptor_type fd, protocol prot,
89 std::size_t preferred_frame_size,
90 core::channel_descriptor & new_descriptor,
91 channel * & new_channel);
92 #ifdef YAMI4_WITH_OPEN_SSL 94 char * target, io_descriptor_type fd, protocol prot,
95 std::size_t preferred_frame_size,
96 core::channel_descriptor & new_descriptor);
97 #endif // YAMI4_WITH_OPEN_SSL 103 bool hard_close, std::size_t priority);
105 bool hard_close, std::size_t priority);
110 const core::serializable & message_header,
111 const core::serializable & message_body,
112 std::size_t priority,
114 void * progress_hint);
116 const core::serializable & message_header,
117 const core::serializable & message_body,
118 std::size_t priority,
120 void * progress_hint);
124 void * connection_hook_hint,
125 const char * * resolved_target);
126 void remove_listener(
const char * target);
136 bool allow_outgoing_traffic,
137 bool allow_incoming_traffic);
141 core::result process_complete_incoming_frame(core::channel_descriptor cd,
142 const char * buffer,
const std::size_t buffer_size);
144 #ifdef YAMI4_WITH_QNX 148 void set_default_qnx_listening_channel_id(
int chid);
149 #endif // YAMI4_WITH_QNX 153 const options & get_options()
const {
return configuration_options_; }
155 void get_channel_usage(
int & max_allowed,
int & used);
157 core::result get_pending_outgoing_bytes(core::channel_descriptor cd, std::size_t & bytes);
158 core::result get_pending_outgoing_bytes(
const char * target, std::size_t & bytes);
162 channel_group(
const channel_group &);
163 void operator=(
const channel_group &);
165 core::result do_close(channel * ch, std::size_t priority,
167 core::result do_hard_close(channel * ch, std::size_t index);
172 std::size_t & index, std::size_t & sequence_number,
173 channel * & ch)
const;
179 core::result find_unused_channel(std::size_t & index,
bool reserve);
181 bool channel_dec_ref(std::size_t index, channel * ch);
183 void prune_listeners();
185 std::size_t generate_message_id();
189 options configuration_options_;
191 channel_holder * channel_holders_;
192 std::size_t channels_num_;
193 channel * * shadow_channels_;
194 std::size_t shadow_channels_num_;
196 listener * first_listener_;
198 #ifdef YAMI4_WITH_QNX 199 int qnx_listener_channel_id_;
200 #endif // YAMI4_WITH_QNX 208 std::size_t last_message_id_;
211 void * incoming_message_hint_;
213 void * disconnection_hook_hint_;
216 void * event_notification_hint_;
219 void * io_error_callback_hint_;
221 #ifdef YAMI4_WITH_OPEN_SSL 223 #endif // YAMI4_WITH_OPEN_SSL 230 #endif // YAMICORE_CHANNEL_GROUP_H_INCLUDED 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
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
Namespace devoted for everything related to YAMI4.
Definition: agent.h:25
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
result
General type for reporting success and error states.
Definition: core.h:32