- void add_client(int sock);
- void add_client_from_serialized(const ClientProto &client);
-
- // Adds the given stream to all the servers.
- void add_stream(const std::string &stream_id, size_t backlog_size, Stream::Encoding encoding);
- void add_stream_from_serialized(const StreamProto &stream, const std::vector<int> &data_fds);
+ void add_client(int sock, Acceptor *acceptor);
+ void add_client_from_serialized(const ClientProto &client, const std::vector<std::shared_ptr<const std::string>> &short_responses);
+
+ // Picks a srever (round-robin) and adds the given HLS zombie to it.
+ void add_hls_zombie_from_serialized(const HLSZombieProto &client);
+
+ // Adds the given stream to all the servers. Returns the stream index.
+ int add_stream(const std::string &url,
+ const std::string &hls_url,
+ size_t backlog_size,
+ size_t prebuffering_bytes,
+ Stream::Encoding encoding,
+ Stream::Encoding src_encoding,
+ unsigned hls_frag_duration,
+ size_t hls_backlog_margin,
+ const std::string &allow_origin);
+ int add_stream_from_serialized(const StreamProto &stream, const std::vector<int> &data_fds);
+ void delete_stream(const std::string &url);
+ int add_udpstream(const sockaddr_in6 &dst, int pacing_rate, int ttl, int multicast_iface_index);
+
+ // Returns the stream index for the given URL (e.g. /foo.ts). Returns -1 on failure.
+ int lookup_stream_by_url(const std::string &url) const;