]> git.sesse.net Git - cubemap/blobdiff - server.h
Revert "Rewrite the entire internal signal handling/wakeup."
[cubemap] / server.h
index 94fdb67e735e996c46f8c0472f570366bd97a556..a3e032d88f71a2f66b9613781d64053a6f32b143 100644 (file)
--- a/server.h
+++ b/server.h
@@ -12,6 +12,7 @@
 #include <vector>
 
 #include "client.h"
+#include "stream.h"
 #include "thread.h"
 
 class ClientProto;
@@ -34,7 +35,9 @@ public:
        std::vector<ClientStats> get_client_stats() const;
 
        // Set header (both HTTP header and any stream headers) for the given stream.
-       void set_header(const std::string &stream_id, const std::string &header);
+       void set_header(const std::string &stream_id,
+                       const std::string &http_header,
+                       const std::string &stream_header);
 
        // Set that the given stream should use the given mark pool from now on.
        // NOTE: This should be set before any clients are connected!
@@ -51,8 +54,10 @@ public:
        // at the same time).
        CubemapStateProto serialize();
        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 add_stream(const std::string &stream_id, size_t bytes_received, Stream::Encoding encoding);
+       void add_stream_from_serialized(const StreamProto &stream, int data_fd);
+       void set_backlog_size(const std::string &stream_id, size_t new_size);
+       void set_encoding(const std::string &stream_id, Stream::Encoding encoding);
 
 private:
        // Mutex protecting queued_data only. Note that if you want to hold both this