]> git.sesse.net Git - cubemap/blobdiff - udpinput.h
Use C++11 std::mutex and std::lock_guard instead of our RAII wrapper.
[cubemap] / udpinput.h
index 11a369073ad0ce000fdb5ec680f6e7d4b4a159c9..4de9788768e71ed1a98bccd844eade0d5b5f05ab 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _UDPINPUT_H
 #define _UDPINPUT_H 1
 
-#include <pthread.h>
+#include <mutex>
 #include <string>
 #include <vector>
 
@@ -35,7 +35,7 @@ private:
 
        // The URL and its parsed components.
        std::string url;
-       std::string host, port, path;
+       std::string user, host, port, path;
 
        // The HTTP header we're sending to clients.
        std::string http_header;
@@ -47,7 +47,7 @@ private:
        char packet_buf[65536];
 
        // Mutex protecting <stats>.
-       mutable pthread_mutex_t stats_mutex;
+       mutable std::mutex stats_mutex;
 
        // The current statistics for this connection. Protected by <stats_mutex>.
        InputStats stats;