#include <sys/types.h>
#include <time.h>
#include <map>
+#include <memory>
#include <queue>
#include <string>
#include <vector>
// can be taken a lot of the time.
//
// Protected by <queued_clients_mutex>.
- std::vector<std::pair<int, Acceptor *> > queued_add_clients;
+ std::vector<std::pair<int, Acceptor *>> queued_add_clients;
// All variables below this line are protected by the mutex.
mutable pthread_mutex_t mutex;
// All streams.
- std::vector<Stream *> streams;
+ std::vector<std::unique_ptr<Stream>> streams;
// Map from URL to index into <streams>.
std::map<std::string, int> stream_url_map;
// This means that when reading it, we need to check if the client it
// describes is still exists (ie., that the fd still exists, and that
// the timespec matches).
- std::queue<std::pair<timespec, int> > clients_ordered_by_connect_time;
+ std::queue<std::pair<timespec, int>> clients_ordered_by_connect_time;
// Used for epoll implementation (obviously).
int epoll_fd;