- // We have more data, so mark all clients that are sleeping as ready to go.
- void wake_up_all_clients();
+ // Add more data to <queued_data>, adding Metacube headers if needed.
+ // Does not take ownership of <data>.
+ // You should hold the owning Server's <queued_data_mutex>.
+ void add_data_deferred(const char *data, size_t bytes, StreamStartSuitability suitable_for_stream_start);
+
+ // Add queued data to the stream, if any.
+ // You should hold the owning Server's <mutex> _and_ <queued_data_mutex>.
+ void process_queued_data();