HTTPD::HTTPD()
{
+ global_metrics.add("num_connected_clients", &metric_num_connected_clients, Metrics::TYPE_GAUGE);
}
HTTPD::~HTTPD()
unique_lock<mutex> lock(streams_mutex);
streams.insert(stream);
}
+ ++metric_num_connected_clients;
*con_cls = stream;
// Does not strictly have to be equal to MUX_BUFFER_SIZE.
delete stream;
httpd->streams.erase(stream);
}
+ --httpd->metric_num_connected_clients;
}
ssize_t HTTPD::Stream::reader_callback_thunk(void *cls, uint64_t pos, char *buf, size_t max)