UltraMonkey-L7 V3(multi-thread implementation)
Revisión | ad5d1262d2495f4f2a45759ea8c0f5e88ad9e43e (tree) |
---|---|
Tiempo | 2015-04-01 15:44:53 |
Autor | ![]() |
Commiter | Shinya TAKEBAYASHI |
Fixed compile error when using boost 1.50 or higher.
@@ -840,7 +840,11 @@ void tcp_session::up_thread_run() | ||
840 | 840 | } |
841 | 841 | if (!server_connected_flag && server_connect_time_out != 0) { |
842 | 842 | boost::xtime now_time; |
843 | +#if BOOST_VERSION >= 105000 | |
844 | + boost::xtime_get(&now_time, boost::TIME_UTC_); | |
845 | +#else | |
843 | 846 | boost::xtime_get(&now_time, boost::TIME_UTC); |
847 | +#endif | |
844 | 848 | if ((now_time.sec - client_connected_time.sec) > server_connect_time_out) { // timeout detect. |
845 | 849 | boost::system::error_code error_code; |
846 | 850 | client_socket.close(error_code); |
@@ -1139,7 +1143,11 @@ void tcp_session::up_thread_client_accept(const TCP_PROCESS_TYPE_TAG process_typ | ||
1139 | 1143 | this, |
1140 | 1144 | boost::asio::placeholders::error)); |
1141 | 1145 | } else { |
1146 | +#if BOOST_VERSION >= 105000 | |
1147 | + boost::xtime_get(&client_connected_time, boost::TIME_UTC_); | |
1148 | +#else | |
1142 | 1149 | boost::xtime_get(&client_connected_time, boost::TIME_UTC); |
1150 | +#endif | |
1143 | 1151 | upthread_status = UPTHREAD_ACTIVE; |
1144 | 1152 | } |
1145 | 1153 | up_thread_next_call_function = up_thread_function_array[func_tag]; |