//! downthread mutex reference getter
//! @return reference of boost::mutex
boost::mutex& get_downthread_mutex();
+
+ void session_stop(){ session->set_virtual_service_message( tcp_session::SESSION_END ); }
+ void session_sorry_mode_change( int sorry_flag ){
+ if( INT_MAX == sorry_flag )
+ session->set_virtual_service_message( tcp_session::SORRY_STATE_DISABLE );
+ else if( 0 != sorry_flag )
+ session->set_virtual_service_message( tcp_session::SORRY_STATE_ENABLE );
+ }
+ void session_sorry_enable(){ session->set_virtual_service_message( tcp_session::SORRY_STATE_ENABLE ); }
+ void session_sorry_disable(){ session->set_virtual_service_message( tcp_session::SORRY_STATE_DISABLE ); }
+ void session_pause_on(){ session->set_virtual_service_message( tcp_session::SESSION_PAUSE_ON ); }
+ void session_pause_off(){ session->set_virtual_service_message( tcp_session::SESSION_PAUSE_OFF ); }
+
};
}// namespace l7vs
#include "tcp_socket.h"
#include "tcp_realserver_connect_socket_list.h"
#include "tcp_data.h"
-#include "tcp_thread_message_que.h"
+//#include "tcp_thread_message_que.h"
+#include "lockfree_queue.h"
#define TCP_SESSION_THREAD_STATE_BIT 8
//! @brief this class is parent virtualservice class.
class virtualservice_tcp;
+//! @class tcp_thread_message
+//! @brief tcp_thread_message class name define.
+ class tcp_thread_message;
+
//! @class tcp_session
//! @brief this class is tcp session class.
class tcp_session : private boost::noncopyable{
//! up thread use destination side buffer
tcp_data up_thread_data_dest_side;
//! message data queue for up thread
- tcp_thread_message_que up_thread_message_que;
+// tcp_thread_message_que up_thread_message_que;
+ lockfree_queue< tcp_thread_message > up_thread_message_que;
//! up thread use message data
tcp_data up_thread_message_data;
//! down thread call function object array
//! down thread use destination side buffer
tcp_data down_thread_data_dest_side;
//! message data queue for down thread
- tcp_thread_message_que down_thread_message_que;
+// tcp_thread_message_que down_thread_message_que;
+ lockfree_queue< tcp_thread_message > down_thread_message_que;
//! up thread use message data
tcp_data down_thread_message_data;