X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=stream.h;h=9e384a9ffd141b63fee39f44c8140b29269d9020;hp=931da2aa236e941ad72833a3af0d12cdbfac2ec2;hb=7ec54788f88dde7b083ba6cfd30732b32295b54a;hpb=980ac162414c9fce62af4fdb9cfc282865b31572;ds=inline diff --git a/stream.h b/stream.h index 931da2a..9e384a9 100644 --- a/stream.h +++ b/stream.h @@ -47,8 +47,13 @@ struct Stream { void set_backlog_size(size_t new_size); // You should hold the owning Server's , since it calls add_data_raw(). + // Sets unavailable to false. void set_header(const std::string &new_http_header, const std::string &new_stream_header); + void set_unavailable() { + unavailable = true; + } + // Mutex protecting and . // Note that if you want to hold both this and the owning server's // you will need to take before this one. @@ -56,6 +61,10 @@ struct Stream { std::string url; + // If true, the backend is not completely connected, and thus, we cannot serve + // clients (except for historic HLS fragments). + bool unavailable = true; + // The HTTP response header, without the trailing double newline. std::string http_header;