+void ServerPool::add_data(int stream_index, const char *data, size_t bytes, StreamStartSuitability suitable_for_stream_start)
+{
+ assert(stream_index >= 0 && stream_index < ssize_t(num_http_streams + udp_streams.size()));
+
+ if (stream_index >= num_http_streams) {
+ // UDP stream.
+ udp_streams[stream_index - num_http_streams]->send(data, bytes);
+ return;
+ }
+
+ // HTTP stream.
+ for (int i = 0; i < num_servers; ++i) {
+ servers[i].add_data_deferred(stream_index, data, bytes, suitable_for_stream_start);
+ }
+}
+
+void ServerPool::add_ping(const std::string &url, const std::string &allow_origin)