+int ServerPool::lookup_stream_by_url(const string &url) const
+{
+ assert(servers != NULL);
+ return servers[0].lookup_stream_by_url(url);
+}
+
+int ServerPool::add_stream(const string &url, size_t backlog_size, size_t prebuffering_bytes, Stream::Encoding encoding)
+{
+ // Adding more HTTP streams after UDP streams would cause the UDP stream
+ // indices to move around, which is obviously not good.
+ assert(udp_streams.empty());
+
+ for (int i = 0; i < num_servers; ++i) {
+ int stream_index = servers[i].add_stream(url, backlog_size, prebuffering_bytes, encoding);
+ assert(stream_index == num_http_streams);
+ }
+ return num_http_streams++;
+}
+
+int ServerPool::add_stream_from_serialized(const StreamProto &stream, const vector<int> &data_fds)