#include <sys/epoll.h>
#include <sys/types.h>
#include <time.h>
-#include <map>
#include <memory>
#include <mutex>
#include <queue>
#include <string>
+#include <unordered_map>
#include <vector>
#include "tlse.h"
std::vector<std::unique_ptr<Stream>> streams;
// Map from URL to index into <streams>.
- std::map<std::string, int> stream_url_map, stream_hls_url_map;
+ std::unordered_map<std::string, int> stream_url_map, stream_hls_url_map;
// Map from URL to CORS Allow-Origin header (or empty string).
- std::map<std::string, std::string> ping_url_map;
+ std::unordered_map<std::string, std::string> ping_url_map;
// Map from file descriptor to client.
- std::map<int, Client> clients;
+ std::unordered_map<int, Client> clients;
// A list of all clients, ordered by the time they connected (first element),
// and their file descriptor (second element). It is ordered by connection time
epoll_event events[EPOLL_MAX_EVENTS];
// For each TLS-enabled acceptor, our private server context for its key pair.
- std::map<const Acceptor *, TLSContext *> tls_server_contexts;
+ std::unordered_map<const Acceptor *, TLSContext *> tls_server_contexts;
// The actual worker thread.
virtual void do_work();