double m_duration_max;
double m_duration_min;
double m_duration_total;
+ bool m_stop;
public:
Rep();
~Rep();
number_total += m_p->m_duration_freq[i];
number_total += m_p->m_duration_freq[i];
- wrbuf_puts(w, "<?xml version=\"1.0\">\n");
+ wrbuf_puts(w, "<?xml version=\"1.0\"?>\n");
wrbuf_puts(w, "<frontend_net>\n");
wrbuf_printf(w, " <responses frequency=\"%d\">\n", number_total);
for (i = 0; m_p->m_duration_lim[i] != 0.0; i++)
m_p->m_duration_total / number_total);
wrbuf_puts(w, " </responses>\n");
+
+ int thread_busy;
+ int thread_total;
+ m_thread_pool_observer->get_thread_info(thread_busy, thread_total);
+
+ wrbuf_printf(w, " <thread_info busy=\"%d\" total=\"%d\"/>\n",
+ thread_busy, thread_total);
+
wrbuf_puts(w, "</frontend_net>\n");
hres->content_len = w.len();
{
Z_HTTP_Request *hreq = z_pdu->u.HTTP_Request;
+ const char *f = z_HTTP_header_lookup(hreq->headers, "X-Forwarded-For");
+ if (f)
+ p->origin().set_tcpip_address(std::string(f), m_session.id());
+
if (m_p->m_stat_req.length()
&& !strcmp(hreq->path, m_p->m_stat_req.c_str()))
{
m_duration_max = 0.0;
m_duration_min = 0.0;
m_duration_total = 0.0;
+ m_stop = false;
}
yf::FrontendNet::Rep::~Rep()
void yf::FrontendNet::stop() const
{
- if (m_p->az)
- {
- size_t i;
- for (i = 0; i < m_p->m_ports.size(); i++)
- m_p->az[i]->server("");
- }
+ m_p->m_stop = true;
}
bool yf::FrontendNet::My_Timer_Thread::timeout()
}
while (m_p->mySocketManager.processEvent() > 0)
{
+ if (m_p->m_stop)
+ {
+ m_p->m_stop = false;
+ if (m_p->az)
+ {
+ size_t i;
+ for (i = 0; i < m_p->m_ports.size(); i++)
+ m_p->az[i]->server("");
+ }
+ }
int no = m_p->mySocketManager.getNumberOfObservers();
if (no <= 1)
break;