typedef boost::shared_ptr<boost::mutex> mutex_ptr;
+ typedef std::list<l7vs::realserver>
+ rslist_type;
+ typedef boost::function< rslist_type::iterator (void)>
+ rslist_iterator_begin_func_type;
+ typedef boost::function< rslist_type::iterator (void)>
+ rslist_iterator_end_func_type;
+ typedef boost::function< rslist_type::iterator (rslist_type::iterator)>
+ rslist_iterator_next_func_type;
+ typedef boost::function< void ( const boost::thread::id,
+ rslist_iterator_begin_func_type,
+ rslist_iterator_end_func_type,
+ rslist_iterator_next_func_type,
+ boost::asio::ip::tcp::endpoint& ) >
+ tcp_schedule_func_type;
+
//! @struct replication_header replication header structure
struct replication_header{
unsigned int data_num;
return tmp_rep.pay_memory( inid, *outsize );
}
+ void schedule_rs(
+ boost::thread::id thread_id,
+ rslist_iterator_begin_func_type in_begin,
+ rslist_iterator_end_func_type in_end,
+ rslist_iterator_next_func_type in_next,
+ boost::asio::ip::tcp::endpoint& in_ep ){
+ schedmod->handle_schedule( thread_id, in_begin, in_end, in_next, in_ep );
+ }
+
public:
virtualservice_base( const l7vsd&,
const replication&,
boost::bind( &l7vs::virtualservice_tcp::rs_list_unlock, this ),
element.tcp_accept_endpoint,
element.udp_recv_endpoint );
+ tcp_schedule_func_type sched_rs_func = boost::bind( &l7vs::virtualservice_tcp::schedule_rs, this, _1, _2, _3, _4, _5 );
+ protomod->register_schedule( sched_rs_func );
l7vs::protocol_module_base::check_message_result pm_result;
pm_result = protomod->check_parameter( element.protocol_args );