]> git.sesse.net Git - cubemap/blobdiff - server.h
Identify UDPInput error messages by the stream, too.
[cubemap] / server.h
index 343adf9bfd28f1513fcd6c9ccbec011919b9e147..2d227b6e1797ec331c7a6e966ec412d5f6c7a79b 100644 (file)
--- a/server.h
+++ b/server.h
@@ -1,17 +1,22 @@
 #ifndef _SERVER_H
 #define _SERVER_H 1
 
-#include <stdint.h>
 #include <pthread.h>
+#include <stddef.h>
+#include <stdint.h>
 #include <sys/epoll.h>
+#include <sys/types.h>
 #include <time.h>
-#include <string>
 #include <map>
+#include <string>
 #include <vector>
 
 #include "client.h"
 #include "thread.h"
 
+class ClientProto;
+struct Stream;
+
 #define EPOLL_MAX_EVENTS 8192
 #define EPOLL_TIMEOUT_MS 20
 #define MAX_CLIENT_REQUEST 16384
@@ -48,6 +53,7 @@ public:
        void add_client_from_serialized(const ClientProto &client);
        void add_stream(const std::string &stream_id, size_t bytes_received);
        void add_stream_from_serialized(const StreamProto &stream);
+       void set_backlog_size(const std::string &stream_id, size_t new_size);
 
 private:
        // Mutex protecting queued_data only. Note that if you want to hold both this
@@ -118,7 +124,6 @@ private:
        void process_queued_data();
 
        void add_client(int sock);
-       void add_data(const std::string &stream_id, const char *data, ssize_t bytes);
 };
 
 #endif  // !defined(_SERVER_H)